mirror of
https://git.isptech.ru/ISPsystem/isp-maintenance.git
synced 2025-09-13 14:43:08 +02:00
Update: BaseAPI class now has error handler
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from requests.packages import urllib3
|
||||
|
||||
from mgrctl.settings.environment import env
|
||||
from mgrctl.settings.platform import (
|
||||
PLATFORM_TYPE,
|
||||
PLATFORM_VERIFY_SSL,
|
||||
@@ -26,6 +27,9 @@ API_HEADERS = {"Internal-Auth": "on", "Accept": "application/json"}
|
||||
# Alias for import:
|
||||
API_VERIFY_SSL = PLATFORM_VERIFY_SSL
|
||||
|
||||
# API 3004 Unavailable error handler:
|
||||
API_COUNT_TRY_CONNECTIONS = env.int('API_COUNT_TRY_CONNECTIONS', 3)
|
||||
|
||||
# Suppress warning from urllib3:
|
||||
if not PLATFORM_VERIFY_SSL_WARNING:
|
||||
# ! This is not recommended,
|
||||
|
Reference in New Issue
Block a user