Skip to content

Commit c699e4b

Browse files
authored
For SG-10538, bad certs on upload fix
This ensures we are using the right certificates when uploading a file.
1 parent d43e9ab commit c699e4b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

shotgun_api3/shotgun.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,7 +3102,8 @@ def _build_opener(self, handler):
31023102
if self.config.proxy_handler:
31033103
handlers.append(self.config.proxy_handler)
31043104

3105-
handlers.append(handler)
3105+
if handler is not None:
3106+
handlers.append(handler)
31063107
return urllib2.build_opener(*handlers)
31073108

31083109
def _turn_off_ssl_validation(self):
@@ -3810,7 +3811,7 @@ def _upload_data_to_storage(self, data, content_type, size, storage_url):
38103811
:rtype: str
38113812
"""
38123813
try:
3813-
opener = urllib2.build_opener(urllib2.HTTPHandler)
3814+
opener = self._build_opener(urllib2.HTTPHandler)
38143815

38153816
request = urllib2.Request(storage_url, data=data)
38163817
request.add_header("Content-Type", content_type)

0 commit comments

Comments
 (0)