Skip to content

Conversation

@cgwalters
Copy link
Member

I'm working on synthesizing an update from an existing oscontainer
and doing that I don't have a cosa build for it handy.

If we don't find a builds.json, assume we're not in a cosa
directory and skip adding the metadata.

I'm working on synthesizing an update from an existing oscontainer
and doing that I don't have a cosa build for it handy.

If we don't find a `builds.json`, assume we're not in a cosa
directory and skip adding the metadata.
Comment on lines +202 to +203
if os.path.isfile('builds/builds.json'):
with open('builds/builds.json') as fb:
Copy link
Member

Choose a reason for hiding this comment

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

This is fine, though the $compiled_language programmer in me wants to do

try:
  with open(...) as fb:
    ...
except FileNotFoundError:
  pass

@jlebon
Copy link
Member

jlebon commented Aug 20, 2020

/lgtm

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, jlebon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 8b41409 into coreos:master Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants