-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
Description
The quick way to test it is with no Internet connection:
import os
import logging
from redminelib import Redmine
from redminelib.exceptions import BaseRedmineError
from requests.exceptions import RequestException
URL = os.getenv("URL", "https://progress.opensuse.org")
USER = os.getenv("USER", "test")
API_KEY = "MYAPIKEY"
try:
client = Redmine(URL, username=USER, key=API_KEY)
client.issue.get(777)
except (BaseRedmineError, RequestException) as exc:
logging.error("%s", exc)
ERROR:root:HTTPSConnectionPool(host='progress.opensuse.org', port=443): Max retries exceeded with url: /issues/777.json?key=MYAPIKEY (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fa218b31450>: Failed to resolve 'progress.opensuse.org' ([Errno -3] Temporary failure in name resolution)"))
The only workaround is to catch requests.exceptions.ConnectionError
.