Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #1615 -- make deploy work after removing cache
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
- Loading branch information
Showing
2 changed files
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
e0cbc67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to use os.path.dirname(timestamp_path), as you are violating "DRY" there.
e0cbc67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why bother? We know
timestamp_path
is in the cache folder, we don’t plan to move it, better to just use this and call it a day.e0cbc67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I wasn't suggesting to change it. It's just that "knowing" comes into play when you repeat yourself, and that can be avoided. That is why "DRY" comes into play for me. Just a comment, no demand.
Seeing code:
os.makedirs(some_dirname)
open(some_filename, "w")
requires that the reader knows the relationship between some_file and some_dir. Using
os.makedirs(dirname(some_filename))
open(some_filename, "w")
on the other hand, is pretty much immediately recognizable.
Again, just a comment, because I looked at the commit. If code review is not welcome, make that clear some prominent place.
e0cbc67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review is certainly welcome.