diff --git a/pilot/util/tracereport.py b/pilot/util/tracereport.py index 46cb3e11..5b6d8cbc 100644 --- a/pilot/util/tracereport.py +++ b/pilot/util/tracereport.py @@ -115,7 +115,7 @@ def init(self, job): try: self['hostname'] = socket.gethostbyaddr(hostname)[0] - except socket.herror as exc: + except (socket.gaierror, socket.herror) as exc: logger.warning(f'unable to detect hostname by address for trace report: {exc}') self['hostname'] = 'unknown'