From 3b45b4de1183b6fd2657aef493a89e1f501e41d1 Mon Sep 17 00:00:00 2001 From: antialias Date: Thu, 24 Jan 2013 11:52:10 -0500 Subject: refine get_username to work on buildslaves --- src/leap/base/config.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') 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(): -- cgit v1.2.3