Code review comment for lp:~doanac/ubuntu-ci-services-itself/publisher-ppa-sync

Revision history for this message
Francis Ginther (fginther) wrote :

90 + with open(output) as f:
91 + ticket_id = config['master']['request_id']
92 + auth = unit_config.get_auth_config()
93 + ds = data_store.create_for_ticket(ticket_id, auth)
94 + url = ds.put_file(output, f.read(), 'text/plain')
95 + result['artifacts'] = [{
96 + 'name': output,
97 + 'reference': url,
98 + 'type': 'LOGS',
99 + }]
100 + ticket.process_artifacts(result)

This is now outside the try block. Is that what you want? If it fails, the exception will now be caught by the try block in main(). This looks right to me as it's still a failure that needs to be surfaced and dealt with (in this case it would behave in a similar way as if the API call had failed). I'll approve, but just want to mention this in case you had a different outcome in mind.

review: Approve

« Back to merge proposal