BLE001: fix
This commit is contained in:
@@ -84,7 +84,7 @@ def _init_proc(
|
||||
print(linebreak + f" {func.__name__}:{pid} " + linebreak, file=sys.stderr)
|
||||
try:
|
||||
func(**kwargs)
|
||||
except Exception as ex:
|
||||
except Exception as ex: # noqa: BLE001
|
||||
traceback.print_exc()
|
||||
if on_except is not None:
|
||||
on_except(ex, mp.current_process())
|
||||
|
||||
@@ -345,7 +345,7 @@ class VMObject(GObject.Object):
|
||||
raise ClanError(msg)
|
||||
with self.qmp_wrap.qmp_ctx() as qmp:
|
||||
qmp.command("system_powerdown")
|
||||
except Exception as ex:
|
||||
except (ClanError, OSError, ConnectionError) as ex:
|
||||
log.debug(f"QMP command 'system_powerdown' ignored. Error: {ex}")
|
||||
|
||||
# Try 20 times to stop the VM
|
||||
|
||||
@@ -139,7 +139,7 @@ class ClanStore:
|
||||
|
||||
# Convert the byte array to a string and print it
|
||||
logs_view.set_message(contents.decode("utf-8"))
|
||||
except Exception as e:
|
||||
except (GLib.Error, UnicodeDecodeError) as e:
|
||||
print(f"Error reading file: {e}")
|
||||
|
||||
# only one vm can output logs at a time
|
||||
|
||||
Reference in New Issue
Block a user