From 5d946ad2e5cf46391dd65cc8b06eafa270e645cb Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Wed, 13 Mar 2024 15:14:02 +0100 Subject: [PATCH] removed 'requests_get' and 'requests_post' from lib functions --- client/ayon_core/lib/__init__.py | 9 ------- client/ayon_core/lib/connections.py | 38 ----------------------------- 2 files changed, 47 deletions(-) delete mode 100644 client/ayon_core/lib/connections.py diff --git a/client/ayon_core/lib/__init__.py b/client/ayon_core/lib/__init__.py index ab6a604adc..acd960d9b5 100644 --- a/client/ayon_core/lib/__init__.py +++ b/client/ayon_core/lib/__init__.py @@ -161,12 +161,6 @@ from .ayon_info import ( is_in_tests, ) - -from .connections import ( - requests_get, - requests_post -) - terminal = Terminal __all__ = [ @@ -283,7 +277,4 @@ __all__ = [ "is_staging_enabled", "is_dev_mode_enabled", "is_in_tests", - - "requests_get", - "requests_post" ] diff --git a/client/ayon_core/lib/connections.py b/client/ayon_core/lib/connections.py deleted file mode 100644 index 6a0cf4ae1c..0000000000 --- a/client/ayon_core/lib/connections.py +++ /dev/null @@ -1,38 +0,0 @@ -import requests -import os - - -def requests_post(*args, **kwargs): - """Wrap request post method. - - Disabling SSL certificate validation if ``DONT_VERIFY_SSL`` environment - variable is found. This is useful when Deadline server is - running with self-signed certificates and its certificate is not - added to trusted certificates on client machines. - - Warning: - Disabling SSL certificate validation is defeating one line - of defense SSL is providing, and it is not recommended. - - """ - if "verify" not in kwargs: - kwargs["verify"] = not os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) - return requests.post(*args, **kwargs) - - -def requests_get(*args, **kwargs): - """Wrap request get method. - - Disabling SSL certificate validation if ``DONT_VERIFY_SSL`` environment - variable is found. This is useful when Deadline server is - running with self-signed certificates and its certificate is not - added to trusted certificates on client machines. - - Warning: - Disabling SSL certificate validation is defeating one line - of defense SSL is providing, and it is not recommended. - - """ - if "verify" not in kwargs: - kwargs["verify"] = not os.getenv("OPENPYPE_DONT_VERIFY_SSL", True) - return requests.get(*args, **kwargs)