summaryrefslogtreecommitdiff
path: root/lib/git/objects/util.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-07-16 12:52:12 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-07-16 12:52:12 +0200
commit3d9310055f364cf3fa97f663287c596920d6e7e5 (patch)
tree0a0f637f51e0f6bb62fbbf98e48a9960adc46d17 /lib/git/objects/util.py
parent694265664422abab56e059b5d1c3b9cc05581074 (diff)
downloadgitpython-3d9310055f364cf3fa97f663287c596920d6e7e5.tar.gz
util.get_user_id(): Will try a windows environment variable as well, the method now yields good results on all tested platforms
Diffstat (limited to 'lib/git/objects/util.py')
-rw-r--r--lib/git/objects/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/git/objects/util.py b/lib/git/objects/util.py
index fd648f09..21833080 100644
--- a/lib/git/objects/util.py
+++ b/lib/git/objects/util.py
@@ -60,7 +60,7 @@ def get_user_id():
""":return: string identifying the currently active system user as name@node
:note: user can be set with the 'USER' environment variable, usually set on windows"""
ukn = 'UNKNOWN'
- username = os.environ.get('USER', ukn)
+ username = os.environ.get('USER', os.environ.get('USERNAME', ukn))
if username == ukn and hasattr(os, 'getlogin'):
username = os.getlogin()
# END get username from login