summaryrefslogtreecommitdiff
path: root/src/leap/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/base')
-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():