aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/ui
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2011-04-14 20:53:04 -0400
committerW. Trevor King <wking@drexel.edu>2011-04-14 20:53:04 -0400
commit8c0c5d1255319e5766d6e1b404b4a0c4dfb6c1f3 (patch)
treeead7252a52888c823bdff62d8471b427807552c1 /libbe/ui
parente788c9c78dff307cf50c86e5ffa8dc92f1734302 (diff)
downloadbugseverywhere-8c0c5d1255319e5766d6e1b404b4a0c4dfb6c1f3.tar.gz
get_fallback_fullname falls back to get_fallback_username if no interesting fullname is set.
Diffstat (limited to 'libbe/ui')
-rw-r--r--libbe/ui/util/user.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbe/ui/util/user.py b/libbe/ui/util/user.py
index 10b2b96..5649fd9 100644
--- a/libbe/ui/util/user.py
+++ b/libbe/ui/util/user.py
@@ -64,10 +64,11 @@ def get_fallback_fullname():
if os.environ.has_key(env):
name = os.environ[env]
break
- if name is None and pwd:
+ if pwd and not name:
pw_ent = pwd.getpwuid(os.getuid())
name = pw_ent.pw_gecos.split(',', 1)[0]
- assert name is not None
+ if not name:
+ name = get_fallback_username()
return name
def get_fallback_email():