Add specific exceptions to except
parent
f968fcd288
commit
7c13c4b207
|
@ -86,7 +86,7 @@ def generate_ansible_template_vars(path):
|
||||||
b_path = to_bytes(path)
|
b_path = to_bytes(path)
|
||||||
try:
|
try:
|
||||||
template_uid = pwd.getpwuid(os.stat(b_path).st_uid).pw_name
|
template_uid = pwd.getpwuid(os.stat(b_path).st_uid).pw_name
|
||||||
except:
|
except (KeyError, TypeError):
|
||||||
template_uid = os.stat(b_path).st_uid
|
template_uid = os.stat(b_path).st_uid
|
||||||
|
|
||||||
temp_vars = {}
|
temp_vars = {}
|
||||||
|
|
Loading…
Reference in New Issue