We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41fa7cc commit 0bd284bCopy full SHA for 0bd284b
roundup/logcontext.py
@@ -152,7 +152,11 @@ def wrapper(*args, **kwargs):
152
elif location == "mailgw":
153
reason = args[1].get_header('message-id', "no_message_id")
154
elif location == "admin":
155
- reason = "roundup-admin(%s): %s" % (os.getlogin(), args[1][:2])
+ try:
156
+ login = os.getlogin()
157
+ except OSError:
158
+ login = "unknown"
159
+ reason = "roundup-admin(%s): %s" % (login, args[1][:2])
160
elif location.startswith("file://"):
161
reason = location
162
elif location == "client_main" and 'REQUEST_URI' in args[0].env:
0 commit comments