catch NameError because of Windows

This commit is contained in:
David Boucha 2014-02-13 01:53:27 -07:00
parent ba7a92860c
commit 01ab5ac943

View File

@ -138,7 +138,7 @@ def gid_to_group(gid):
try:
return grp.getgrgid(gid).gr_name
except KeyError:
except (KeyError, NameError) as e:
return ''
@ -204,7 +204,7 @@ def uid_to_user(uid):
'''
try:
return pwd.getpwuid(uid).pw_name
except KeyError:
except (KeyError, NameError) as e:
return ''