From 815fc3e2f6679a24f76e241f142798700dc90cb0 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Tue, 20 Mar 2012 07:48:45 -0700 Subject: [PATCH] suite: failed runs might not have durations This was one cause of emails not being sent - stale /tmp/cephtest dirs fail without recording a duration. --- teuthology/suite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/suite.py b/teuthology/suite.py index aaaa8cc45b11f..a0d33d60fabea 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -201,7 +201,7 @@ def ls(): owner=summary.get('owner', '-'), desc=summary.get('description', '-'), success='pass' if summary['success'] else 'FAIL', - duration=int(summary.get('duration', 0)) + duration=int(summary.get('duration', 0)), ) if args.verbose and 'failure_reason' in summary: print ' {reason}'.format(reason=summary['failure_reason']) @@ -333,7 +333,7 @@ def _results(args): for new in g: summary.update(new) desc = '{test}: ({duration}s) {desc}'.format( - duration=int(summary['duration']), + duration=int(summary.get('duration', 0)), desc=summary['description'], test=j, ) -- 2.39.5