fixed bug where windows would throw OSError which wasn't caught
authorGeorgios Atheridis <atheridis@tutamail.com>
Thu, 2 Jun 2022 10:37:55 +0000 (13:37 +0300)
committerGeorgios Atheridis <atheridis@tutamail.com>
Thu, 2 Jun 2022 10:37:55 +0000 (13:37 +0300)
aptbot/args_logic.py

index 3f715639f9525345608d775097d948500a579766..e12ccc8bc99d45428bcd1fd5273271683614951c 100644 (file)
@@ -37,7 +37,7 @@ def add_account(s: socket.socket, acc: str):
     msg = ""
     try:
         s.send(bytes(f"{command}==={channel}==={msg}", "utf-8"))
-    except BrokenPipeError:
+    except (BrokenPipeError, OSError):
         pass
 
 
@@ -68,7 +68,7 @@ def disable_account(s: socket.socket, acc: str):
     msg = ""
     try:
         s.send(bytes(f"{command}==={channel}==={msg}", "utf-8"))
-    except BrokenPipeError:
+    except (BrokenPipeError, OSError):
         pass