From 3d9310055f364cf3fa97f663287c596920d6e7e5 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 16 Jul 2010 12:52:12 +0200 Subject: util.get_user_id(): Will try a windows environment variable as well, the method now yields good results on all tested platforms --- lib/git/objects/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/git/objects/util.py') 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 -- cgit v1.2.1