From 486af877850f079cf729534c2f853ec9ce2168da Mon Sep 17 00:00:00 2001 From: Paul Nilsson Date: Mon, 23 Sep 2024 13:08:59 +0200 Subject: [PATCH] Improved exception handling --- PILOTVERSION | 2 +- pilot/util/constants.py | 2 +- pilot/util/https.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PILOTVERSION b/PILOTVERSION index 0a24dc84..6e7d9009 100644 --- a/PILOTVERSION +++ b/PILOTVERSION @@ -1 +1 @@ -3.8.2.6 \ No newline at end of file +3.8.2.7 \ No newline at end of file diff --git a/pilot/util/constants.py b/pilot/util/constants.py index b2693f62..4c42e76e 100644 --- a/pilot/util/constants.py +++ b/pilot/util/constants.py @@ -28,7 +28,7 @@ RELEASE = '3' # released number should be fixed at 3 for Pilot 3 VERSION = '8' # version number is '1' for first release, '0' until then, increased for bigger updates REVISION = '2' # revision number should be reset to '0' for every new version release, increased for small updates -BUILD = '6' # build number should be reset to '1' for every new development cycle +BUILD = '7' # build number should be reset to '1' for every new development cycle SUCCESS = 0 FAILURE = 1 diff --git a/pilot/util/https.py b/pilot/util/https.py index 9a2da0d2..a26c75ce 100644 --- a/pilot/util/https.py +++ b/pilot/util/https.py @@ -646,7 +646,7 @@ def get_panda_server(url: str, port: int, update_server: bool = True) -> str: if default in pandaserver: try: rnd = random.choice([socket.getfqdn(vv) for vv in set([v[-1][0] for v in socket.getaddrinfo(default, 25443, socket.AF_INET)])]) - except socket.herror as exc: + except (socket.herror, socket.gaierror) as exc: logger.warning(f'failed to get address from socket: {exc} - will use default server ({pandaserver})') else: pandaserver = pandaserver.replace(default, rnd)