diff options
author | Ashley Camba Garrido <ashwoods@gmail.com> | 2018-05-23 12:32:25 +0100 |
---|---|---|
committer | Ashley Camba <ashwoods@gmail.com> | 2018-05-23 14:42:11 +0100 |
commit | 640c1f80b2b212e9398a4bae50e3180c082d29bf (patch) | |
tree | 2a9849da9ff82fc13b400e52c73cedf464237c8e | |
parent | df48707387ac042a2dbc5f87c8759efe21a63ea0 (diff) | |
download | raven-640c1f80b2b212e9398a4bae50e3180c082d29bf.tar.gz |
Wrap getpwid in exception fixes:#1242
-rw-r--r-- | raven/scripts/runner.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/raven/scripts/runner.py b/raven/scripts/runner.py index 9b06dd1..926925e 100644 --- a/raven/scripts/runner.py +++ b/raven/scripts/runner.py @@ -40,8 +40,10 @@ def get_uid(): import pwd except ImportError: return None - return pwd.getpwuid(os.geteuid())[0] - + try: + return pwd.getpwuid(os.geteuid())[0] + except KeyError: # Sometimes fails in containers + return None def send_test_message(client, options): sys.stdout.write("Client configuration:\n") |