From 2c7edf5cfbd6a09e8067a1bc77b4729b53280b44 Mon Sep 17 00:00:00 2001 From: heri3x Date: Sat, 22 Apr 2023 16:46:35 +0900 Subject: [PATCH] Fix the exception handling for cases where socket.gaierror is thrown. --- poco/drivers/std/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poco/drivers/std/__init__.py b/poco/drivers/std/__init__.py index dcee9dd..ae59545 100644 --- a/poco/drivers/std/__init__.py +++ b/poco/drivers/std/__init__.py @@ -96,7 +96,7 @@ def __init__(self, port=DEFAULT_PORT, device=None, use_airtest_input=True, **kwa else: try: ip = self.device.get_ip_address() - except AttributeError: + except: try: ip = socket.gethostbyname(socket.gethostname()) except socket.gaierror: