Browse Source

tooncher.launch: raise `RuntimeError` instead of `Exception` when server sends unexpected response instead of confirming login (fixing pylint's broad-exception-raised warning)

https://github.com/fphammerle/tooncher/commit/df8bf17a28ad94e33212e89dcb75ef38f1800b54
https://github.com/fphammerle/tooncher/commit/bb81c11305c3644d7c0d690d931f6df803832964
https://github.com/fphammerle/python-cc1101/commit/49ea3820ffb845ca707ccaa7d3bfb783ac287fbf
https://github.com/fphammerle/acpi-backlight/commit/808f905cf6f0ed2dadbde7a79fb8d1a99bb9093e
Fabian Peter Hammerle 1 year ago
parent
commit
b39a6b91f7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tooncher/__init__.py

+ 1 - 1
tooncher/__init__.py

@@ -131,7 +131,7 @@ def launch(
             validate_ssl_cert=validate_ssl_certs,
         )
     if not isinstance(result, _LoginSuccessful):
-        raise Exception(f"unexpected response: {result!r}")
+        raise RuntimeError(f"unexpected response: {result!r}")
     process = start_engine(
         engine_path=engine_path,
         gameserver=result.gameserver,