Skip to content

Conversation

@SergBobrovsky
Copy link
Contributor

No description provided.

if not filename.startswith(root):
return HTTPError(403, "Access denied.")
if not os.path.exists(filename) or not os.path.isfile(filename):
if not os.path.isfile(filename):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, this is redundant.

In [71]: os.path.isfile("no-such-file")
Out[71]: False

@SergBobrovsky I believe that it will be easier for @defnull to review all your PRs if your commit messages are a bit more verbose.
Adding stuff like this in the commit message surely helps.

Copy link

@RonRothman RonRothman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants