Bkacup: Fix CLI logging of exceptions
This commit is contained in:
1 parent
196b152ec4
commit
3800b21e69
1 file changed
+3
-6
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user