mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
catch NameError because of Windows
This commit is contained in:
parent
ba7a92860c
commit
01ab5ac943
@ -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 ''
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user