Show More
@@ -8,6 +8,7 b'' | |||||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import errno |
|
10 | import errno | |
|
11 | import getpass | |||
11 | import msvcrt |
|
12 | import msvcrt | |
12 | import os |
|
13 | import os | |
13 | import re |
|
14 | import re | |
@@ -563,6 +564,8 b' def username(uid=None):' | |||||
563 | """Return the name of the user with the given uid. |
|
564 | """Return the name of the user with the given uid. | |
564 |
|
565 | |||
565 | If uid is None, return the name of the current user.""" |
|
566 | If uid is None, return the name of the current user.""" | |
|
567 | if not uid: | |||
|
568 | return pycompat.fsencode(getpass.getuser()) | |||
566 | return None |
|
569 | return None | |
567 |
|
570 | |||
568 |
|
571 |
General Comments 0
You need to be logged in to leave comments.
Login now