Skip to content

Commit

Permalink
Drop passwd from DebuggableHTTPHandler
Browse files Browse the repository at this point in the history
DebuggableHTTPHandler does not use passwd directly.
  • Loading branch information
deathaxe committed Jan 27, 2024
1 parent 39d47c2 commit e5b8b40
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion package_control/downloaders/urllib_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def setup_opener(self, url, timeout):
user_agent=self.settings.get('user_agent')
))
else:
handlers.append(DebuggableHTTPHandler(debug=debug, passwd=password_manager))
handlers.append(DebuggableHTTPHandler(debug=debug))
self.opener = build_opener(*handlers)

def supports_ssl(self):
Expand Down
2 changes: 0 additions & 2 deletions package_control/http/debuggable_http_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class DebuggableHTTPConnection(HTTPConnection):
_debug_protocol = 'HTTP'

def __init__(self, host, port=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, **kwargs):
self.passwd = kwargs.get('passwd')

if 'debug' in kwargs and kwargs['debug']:
self.debuglevel = 5
elif 'debuglevel' in kwargs:
Expand Down
2 changes: 0 additions & 2 deletions package_control/http/debuggable_http_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ def __init__(self, debuglevel=0, debug=False, **kwargs):
self._debuglevel = 5
else:
self._debuglevel = debuglevel
self.passwd = kwargs.get('passwd')

def http_open(self, req):
def http_class_wrapper(host, **kwargs):
kwargs['passwd'] = self.passwd
if 'debuglevel' not in kwargs:
kwargs['debuglevel'] = self._debuglevel
return DebuggableHTTPConnection(host, **kwargs)
Expand Down

0 comments on commit e5b8b40

Please sign in to comment.