Skip piuparts policy if summary file is missing

ubuntu/rebased
Martin Pitt 8 years ago committed by Iain Lane
parent af7da4e764
commit 883f01740f
No known key found for this signature in database
GPG Key ID: E352D5C51C5041D4

@ -758,6 +758,11 @@ class PiupartsPolicy(BasePolicy):
def _read_piuparts_summary(self, filename, keep_url=True):
summary = {}
if not os.path.exists(filename):
self.logger.info("%s missing; skipping piuparts processing" % filename)
return summary
self.logger.info("Loading piuparts report from %s", filename)
with open(filename) as fd:
if os.fstat(fd.fileno()).st_size < 1:

Loading…
Cancel
Save