Browse code

import getpass for Windows

Matt Domsch authored on 2014/04/11 07:12:56
Showing 1 changed files
... ...
@@ -482,13 +482,14 @@ def calculateChecksum(buffer, mfile, offset, chunk_size, send_chunk):
482 482
 __all__.append("calculateChecksum")
483 483
 
484 484
 
485
-# Deal with the fact that pwd and grp modules don't exist for Windos
485
+# Deal with the fact that pwd and grp modules don't exist for Windows
486 486
 try:
487 487
     import pwd
488 488
     def getpwuid_username(uid):
489 489
         """returns a username from the password databse for the given uid"""
490 490
         return pwd.getpwuid(uid).pw_name
491 491
 except ImportError:
492
+    import getpass
492 493
     def getpwuid_username(uid):
493 494
         return getpass.getuser()
494 495
 __all__.append("getpwuid_username")