diff options
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -275,17 +275,17 @@ class _UserAgentHandler(urllib.request.BaseHandler): | |||
275 | return req | 275 | return req |
276 | 276 | ||
277 | def _AddPasswordFromUserInput(handler, msg, req): | 277 | def _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 | ||
290 | class _BasicAuthHandler(urllib.request.HTTPBasicAuthHandler): | 290 | class _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): |