fix: [dnsdb] Avoiding AttributeError with the sys library, probably depending on the python version

composite_attributes_proposal
chrisr3d 2020-11-04 18:36:06 +01:00
parent 67cc19ac80
commit f7b00deafc
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 4 additions and 1 deletions

View File

@ -119,7 +119,10 @@ class DnsdbClient(object):
break
yield json.loads(line.decode('ascii'))
except (HTTPError, URLError) as e:
raise QueryError(str(e), sys.exc_traceback)
try:
raise QueryError(str(e), sys.exc_traceback)
except AttributeError:
raise QueryError(str(e), sys.exc_info)
def quote(path):