Skip to content

Commit

Permalink
Merge pull request #263 from mtreinish/fix-nonetype-timestamps
Browse files Browse the repository at this point in the history
Handle NoneType timestamps in subunit results
  • Loading branch information
mtreinish committed Aug 5, 2019
2 parents 824455d + f738e00 commit 6433bc0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions stestr/commands/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,11 @@ def _load_case(inserter, repo, case, subunit_out, pretty_out,
start_times = []
stop_times = []
for worker in subunit_trace.RESULTS:
start_times += [
x['timestamps'][0] for x in subunit_trace.RESULTS[worker]]
stop_times += [
x['timestamps'][1] for x in subunit_trace.RESULTS[worker]]
for test in subunit_trace.RESULTS[worker]:
if not test['timestamps'][0] or not test['timestamps'][1]:
continue
start_times.append(test['timestamps'][0])
stop_times.append(test['timestamps'][1])
if not start_times or not stop_times:
sys.stderr.write("\nNo tests were successful during the run")
return 1
Expand Down

0 comments on commit 6433bc0

Please sign in to comment.