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

pull/440/head
chrisr3d 2020-11-04 18:36:06 +01:00
parent d9e576e605
commit 7c5465e02b
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):