Merge pull request #4330 from blueyed/fix-report-last-write

Fix TypeError in report_collect with _collect_report_last_write
This commit is contained in:
Daniel Hahler 2018-11-08 21:06:17 +01:00 committed by GitHub
commit f06fe43649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1 @@
Fix TypeError in report_collect with _collect_report_last_write.

View File

@ -497,7 +497,10 @@ class TerminalReporter(object):
if not final:
# Only write "collecting" report every 0.5s.
t = time.time()
if self._collect_report_last_write > t - 0.5:
if (
self._collect_report_last_write is not None
and self._collect_report_last_write > t - 0.5
):
return
self._collect_report_last_write = t