diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 67b32128c1..5cf9f11cb3 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -168,11 +168,13 @@ def compute_mit_user_fullname(email): answer = DNS.dnslookup( "%s.passwd.ns.athena.mit.edu" % (match_user.group(1),), DNS.Type.TXT) - hesiod_name = answer[0].split(':')[4].split(',')[0].strip() + hesiod_name = answer[0][0].split(':')[4].split(',')[0].strip() if hesiod_name != "": return hesiod_name elif match_user: return match_user.group(1).lower() + "@" + match_user.group(2).upper()[1:] + except DNS.Base.ServerError: + pass except: print ("Error getting fullname for %s:" % (email,)) traceback.print_exc()