show traceback

This commit is contained in:
Steffen Schwebel 2021-05-21 15:10:17 +02:00
parent 32983635c6
commit 4180882fb7

View File

@ -4,6 +4,7 @@ import json
import requests import requests
import hashlib import hashlib
import ipaddress import ipaddress
import traceback
from collections.abc import Iterable from collections.abc import Iterable
from distutils.version import StrictVersion from distutils.version import StrictVersion
@ -105,6 +106,7 @@ def fetch_json(remote_url,
try: try:
data = json.loads(r.content.decode('utf-8')) data = json.loads(r.content.decode('utf-8'))
except Exception as e: except Exception as e:
traceback.print_exc()
raise RuntimeError( raise RuntimeError(
'Error while loading JSON data from {0}'.format(remote_url)) from e 'Error while loading JSON data from {0}'.format(remote_url)) from e
return data return data