Jason R. Coombs  committed da4a4ca

Just use getpass module, which is portable and does the same thing keyring tried to do.

  • Participants
  • Parent commits 8d7eb97
  • Branches default

Comments (0)

Files changed (1)

File keyring/

 """Specific support for getpass."""
 import os
-import pwd
+import getpass
 from keyring.core import get_password as original_get_password
-def get_default_user():
-    """Get the username from the environment or password database.
-    First try various environment variables, then the password
-    database.  This works on Windows as long as USERNAME is set.
-    """
-    for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'):
-        user = os.environ.get(name)
-        if user:
-            return user
-    return pwd.getpwuid(os.getuid())[0]
+get_default_user = getpass.getuser
 def get_password(prompt='Password: ', stream=None,