Open
Conversation
fixed 2 typos here:
1- if last_modified == response.headers.get("last-modified") (line:34)
2- declare the "last_modified" variable before calling it (line:18)
escesare
suggested changes
Feb 20, 2023
|
|
||
| last_modified = "" | ||
| if os.path.exists(destination_file): | ||
| mtime = os.path.getmtime(destination_file) |
Contributor
There was a problem hiding this comment.
Shouldn't last_modified be named mtime? That way it's by default empty (on line 18), and becomes reassigned to the local file's last modified time (on line 20).
As it's written now, last_modified always equals "" on line 34, so the if statement does nothing.
Contributor
|
After reading this code more carefully, much of it doesn't make sense too me. Neither of these variables are being used: My guess is that the intention is to compare them against the response file's modified time, but it's not doing that. Also I don't see |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixed 2 typos here:
1- if last_modified == response.headers.get("last-modified") (line:34) 2- declare the "last_modified" variable before calling it (line:18)