Esempio n. 1
0
 def _prompt_for_password(self, netloc):
     username = ask_input("User for %s: " % netloc)
     if not username:
         return None, None
     auth = _get_keyring_auth(netloc, username)
     if auth:
         return auth[0], auth[1], False
     password = ask_password("Password: ")
     return username, password, True
Esempio n. 2
0
 def _prompt_for_password(self, netloc):
     username = ask_input("User for {}: ".format(netloc))
     if not username:
         return None, None
     auth = get_keyring_auth(netloc, username)
     if auth and auth[0] is not None and auth[1] is not None:
         return auth[0], auth[1], False
     password = ask_password("Password: ")
     return username, password, True
Esempio n. 3
0
 def _prompt_for_password(self, netloc):
     # type: (str) -> Tuple[Optional[str], Optional[str], bool]
     username = ask_input(f"User for {netloc}: ")
     if not username:
         return None, None, False
     auth = get_keyring_auth(netloc, username)
     if auth and auth[0] is not None and auth[1] is not None:
         return auth[0], auth[1], False
     password = ask_password("Password: ")
     return username, password, True
Esempio n. 4
0
<<<<<<< HEAD
        # type: (str) -> Tuple[Optional[str], Optional[str], bool]
        username = ask_input("User for {}: ".format(netloc))
        if not username:
            return None, None, False
        auth = get_keyring_auth(netloc, username)
        if auth and auth[0] is not None and auth[1] is not None:
=======
        username = ask_input("User for {}: ".format(netloc))
        if not username:
            return None, None
        auth = get_keyring_auth(netloc, username)
        if auth:
>>>>>>> b66a76afa15ab74019740676a52a071b85ed8f71
            return auth[0], auth[1], False
        password = ask_password("Password: "******"Save credentials to keyring [y/N]: ", ["y", "n"]) == "y"

    def handle_401(self, resp, **kwargs):
<<<<<<< HEAD
        # type: (Response, **Any) -> Response