Skip to content

Commit

Permalink
Improved exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Nilsson committed Sep 23, 2024
1 parent 98d1360 commit 486af87
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.2.6
3.8.2.7
2 changes: 1 addition & 1 deletion pilot/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pilot/util/https.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 486af87

Please sign in to comment.