-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src/cmd*: use os.path.join() where appropriate #274
Conversation
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.
Changes look good. The (..)
around some os.path.join
s are not required, but they shouldn't hurt anything. They do, however, make it a bit easier to read so 👍.
Adding @jlebon as a reviewer as well so we get two sets of eyes. |
Yup, looks nice! |
# SHA256 for uncompressed image was already calculated during 'build' | ||
img['uncompressed-sha256'] = img['sha256'] | ||
with open(tmpfile, 'wb') as f: | ||
run_verbose(['gzip', '-c', f'builds/{build}/{file}'], stdout=f) | ||
run_verbose(['gzip', '-c', filepath], stdout=f) |
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.
looks like we should have been using filepath
here all along?
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.
It wasn't wrong if that's what you mean. But it was indeed repeating the same string again. :)
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.
Yeah, I made some minor DRY improvements where I could
LGTM |
Split off from #270
This changes all the places where we muck with paths to use
os.path.join()
. Hopefully this is start of some coding standards asdiscussed in #271.