BLE001: fix

This commit is contained in:
Jörg Thalheim
2025-08-20 17:13:38 +02:00
parent c55b369899
commit c9a709783a
16 changed files with 49 additions and 63 deletions

View File

@@ -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())

View File

@@ -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