diff --git a/shotgun_api3/shotgun.py b/shotgun_api3/shotgun.py index 67996c9f..6400ff37 100644 --- a/shotgun_api3/shotgun.py +++ b/shotgun_api3/shotgun.py @@ -4382,7 +4382,7 @@ def _upload_data_to_storage(self, data, content_type, size, storage_url): else: break else: - raise ShotgunError("Max attemps limit reached.") + raise ShotgunError("Max attempts limit reached.") etag = result.info()["Etag"] LOG.debug("Part upload completed successfully.") @@ -4502,42 +4502,7 @@ def _send_form(self, url, params): return result else: - raise ShotgunError("Max attemps limit reached.") - - -class CACertsHTTPSConnection(http.client.HTTPConnection): - """ " - This class allows to create an HTTPS connection that uses the custom certificates - passed in. - """ - - default_port = http.client.HTTPS_PORT - - def __init__(self, *args, **kwargs): - """ - :param args: Positional arguments passed down to the base class. - :param ca_certs: Path to the custom CA certs file. - :param kwargs: Keyword arguments passed down to the bas class - """ - # Pop that argument, - self.__ca_certs = kwargs.pop("ca_certs") - super().__init__(self, *args, **kwargs) - - def connect(self): - "Connect to a host on a given (SSL) port." - super().connect(self) - # Now that the regular HTTP socket has been created, wrap it with our SSL certs. - if (sys.version_info.major, sys.version_info.minor) >= (3, 8): - context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) - context.verify_mode = ssl.CERT_REQUIRED - context.check_hostname = False - if self.__ca_certs: - context.load_verify_locations(self.__ca_certs) - self.sock = context.wrap_socket(self.sock) - else: - self.sock = ssl.wrap_socket( - self.sock, ca_certs=self.__ca_certs, cert_reqs=ssl.CERT_REQUIRED - ) + raise ShotgunError("Max attempts limit reached.") # Helpers from the previous API, left as is. diff --git a/tests/test_client.py b/tests/test_client.py index 1e41ea91..a43e3ed4 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -523,7 +523,7 @@ def test_upload_s3_urlerror__get_attachment_upload_info(self): # Test the exception message the_exception = cm.exception - self.assertEqual(str(the_exception), "Max attemps limit reached.") + self.assertEqual(str(the_exception), "Max attempts limit reached.") def test_upload_s3_urlerror__upload_to_storage(self): """ @@ -557,7 +557,7 @@ def test_upload_s3_urlerror__upload_to_storage(self): # Test the exception message the_exception = cm.exception - self.assertEqual(str(the_exception), "Max attemps limit reached.") + self.assertEqual(str(the_exception), "Max attempts limit reached.") def test_transform_data(self): """Outbound data is transformed"""