Skip to content
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

Merged
merged 1 commit into from
Jan 8, 2019
Merged

src/cmd*: use os.path.join() where appropriate #274

merged 1 commit into from
Jan 8, 2019

Conversation

miabbott
Copy link
Member

@miabbott miabbott commented Jan 8, 2019

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 as
discussed in #271.

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 as
discussed in #271.
@miabbott miabbott requested a review from ashcrow January 8, 2019 18:17
Copy link
Member

@ashcrow ashcrow left a 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.joins are not required, but they shouldn't hurt anything. They do, however, make it a bit easier to read so 👍.

@ashcrow ashcrow requested a review from jlebon January 8, 2019 18:48
@ashcrow
Copy link
Member

ashcrow commented Jan 8, 2019

Adding @jlebon as a reviewer as well so we get two sets of eyes.

@jlebon
Copy link
Member

jlebon commented Jan 8, 2019

Yup, looks nice!

@jlebon jlebon merged commit 3a19656 into coreos:master Jan 8, 2019
# 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)
Copy link
Member

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?

Copy link
Member

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. :)

Copy link
Member Author

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

@dustymabe
Copy link
Member

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.

4 participants