Get the older error if the new one does not exsist

Fixes: #2
This commit is contained in:
Micke Nordin 2024-06-24 16:14:16 +02:00
parent d88ad607c9
commit 287d9a6c2d

View file

@ -14,9 +14,12 @@ from urllib.parse import urlparse
import argcomplete
import requests
import yaml
from requests.exceptions import JSONDecodeError as RequestsJSONDecodeError
from requests.models import HTTPBasicAuth
from simplejson.errors import JSONDecodeError as SimplejsonJSONDecodeError
try:
from requests.exceptions import JSONDecodeError as RequestsJSONDecodeError
except ImportError:
from requests.exceptions import InvalidJSONError as RequestsJSONDecodeError
# Helper functions