From d4f6744329feed169e9ede6009e4072c9e1f1232 Mon Sep 17 00:00:00 2001 From: Nic Jones Date: Wed, 29 Oct 2025 20:03:11 -0400 Subject: [PATCH] Wrong exception to be handled --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f64317e..d1cb0b7 100755 --- a/main.py +++ b/main.py @@ -5,6 +5,8 @@ import argparse import time import logging +from subprocess import TimeoutExpired + from BetterADBSync import sync_with_options from tcpip import reconnect_as_tcpip @@ -172,7 +174,7 @@ def main(): logging.info("Reconnecting device over TCP/IP...") try: tcpip_device = reconnect_as_tcpip(device, adb_path) - except (RuntimeError, TimeoutError) as e: + except (RuntimeError, TimeoutExpired) as e: logging.warning(f"Failed to reconnect device over TCP/IP: {e}") logging.warning("Continuing with the current connection after 10 seconds.") time.sleep(10)