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 87e9c349..b5259870 100755
--- a/main.py
+++ b/main.py
@@ -275,17 +275,17 @@ class _UserAgentHandler(urllib.request.BaseHandler):
275 return req 275 return req
276 276
277def _AddPasswordFromUserInput(handler, msg, req): 277def _AddPasswordFromUserInput(handler, msg, req):
278 # If repo could not find auth info from netrc, try to get it from user input 278 # If repo could not find auth info from netrc, try to get it from user input
279 url = req.get_full_url() 279 url = req.get_full_url()
280 user, password = handler.passwd.find_user_password(None, url) 280 user, password = handler.passwd.find_user_password(None, url)
281 if user is None: 281 if user is None:
282 print(msg) 282 print(msg)
283 try: 283 try:
284 user = raw_input('User: ') 284 user = raw_input('User: ')
285 password = getpass.getpass() 285 password = getpass.getpass()
286 except KeyboardInterrupt: 286 except KeyboardInterrupt:
287 return 287 return
288 handler.passwd.add_password(None, url, user, password) 288 handler.passwd.add_password(None, url, user, password)
289 289
290class _BasicAuthHandler(urllib.request.HTTPBasicAuthHandler): 290class _BasicAuthHandler(urllib.request.HTTPBasicAuthHandler):
291 def http_error_401(self, req, fp, code, msg, headers): 291 def http_error_401(self, req, fp, code, msg, headers):