summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/main.py b/main.py
index 35622ce9..95944546 100755
--- a/main.py
+++ b/main.py
@@ -274,17 +274,17 @@ class _UserAgentHandler(urllib.request.BaseHandler):
274 return req 274 return req
275 275
276def _AddPasswordFromUserInput(handler, msg, req): 276def _AddPasswordFromUserInput(handler, msg, req):
277 # If repo could not find auth info from netrc, try to get it from user input 277 # If repo could not find auth info from netrc, try to get it from user input
278 url = req.get_full_url() 278 url = req.get_full_url()
279 user, password = handler.passwd.find_user_password(None, url) 279 user, password = handler.passwd.find_user_password(None, url)
280 if user is None: 280 if user is None:
281 print(msg) 281 print(msg)
282 try: 282 try:
283 user = raw_input('User: ') 283 user = raw_input('User: ')
284 password = getpass.getpass() 284 password = getpass.getpass()
285 except KeyboardInterrupt: 285 except KeyboardInterrupt:
286 return 286 return
287 handler.passwd.add_password(None, url, user, password) 287 handler.passwd.add_password(None, url, user, password)
288 288
289class _BasicAuthHandler(urllib.request.HTTPBasicAuthHandler): 289class _BasicAuthHandler(urllib.request.HTTPBasicAuthHandler):
290 def http_error_401(self, req, fp, code, msg, headers): 290 def http_error_401(self, req, fp, code, msg, headers):