Bkacup: Fix CLI logging of exceptions

This commit is contained in:
Gina Häußge committed 2018-08-14 19:48:58 +02:00
1 parent 196b152ec4
commit 3800b21e69
1 file changed
+3 -6
+3 -6
View File
@@ -347,12 +347,9 @@ class BackupPlugin(octoprint.plugin.SettingsPlugin,
if exc_info is not None:
exc_type, exc_value, exc_tb = exc_info
s = StringIO()
try:
traceback.print_exception(exc_type, exc_value, exc_tb, None, s)
click.echo(s.getvalue())
finally:
s.close()
output = traceback.format_exception(exc_type, exc_value, exc_tb)
for line in output:
click.echo(line.rstrip(), err=True)
if self._restore_backup(path,
settings=settings,