More idiomatic Python.

This commit is contained in:
Tommi Virtanen 2011-07-01 09:34:08 -07:00
parent ce041a525c
commit 6e73607147

View File

@ -147,13 +147,9 @@ def ls():
else:
raise
for key in ['owner', 'description']:
if not key in summary:
summary[key] = '-'
print "{job} {success} {owner} {desc}".format(
job=j,
owner=summary['owner'],
desc=summary['description'],
owner=summary.get('owner', '-'),
desc=summary.get('description', '-'),
success='pass' if summary['success'] else 'FAIL',
)