update to bleeding-edge StreamHandler.emit

- https://github.com/iterative/dvc/pull/2333#discussion_r314950294
This commit is contained in:
Casper da Costa-Luis
2019-08-17 16:52:47 +01:00
parent 3098460f56
commit 16113c880a
+5 -3
View File
@@ -154,11 +154,13 @@ class LoggerHandler(logging.StreamHandler):
"""Write to Tqdm's stream so as to not break progressbars"""
try:
msg = self.format(record)
Tqdm.write(msg, file=self.stream)
Tqdm.write(
msg, file=self.stream, end=getattr(self, "terminator", "\n")
)
self.flush()
except (KeyboardInterrupt, SystemExit):
except RecursionError:
raise
except: # noqa pylint: disable=bare-except
except Exception:
self.handleError(record)