Wrong exception to be handled
This commit is contained in:
4
main.py
4
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)
|
||||
|
||||
Reference in New Issue
Block a user