summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorantialias <antialias@leap.se>2013-01-24 11:52:10 -0500
committerantialias <antialias@leap.se>2013-01-24 11:52:10 -0500
commit3b45b4de1183b6fd2657aef493a89e1f501e41d1 (patch)
tree20aa95c8bde045b87cf0d1a6c6693170d6118678 /src/leap
parentd02402a147bbae945618befdb8a1a260a91ce7a6 (diff)
refine get_username to work on buildslaves
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/base/config.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/leap/base/config.py b/src/leap/base/config.py
index 7021cb0f..9583a46a 100644
--- a/src/leap/base/config.py
+++ b/src/leap/base/config.py
@@ -336,11 +336,8 @@ def get_username():
try:
return os.getlogin()
except OSError as e:
- if e.message == "[Errno 22] Invalid argument":
- import pwd
- return pwd.getpwuid(os.getuid())[0]
- else:
- raise OSError(e.message)
+ import pwd
+ return pwd.getpwuid(os.getuid())[0]
def get_groupname():