Add specific exceptions to except

This commit is contained in:
Joren Vrancken 2018-07-31 10:54:04 +02:00 committed by Brian Coca
parent f968fcd288
commit 7c13c4b207

View file

@ -86,7 +86,7 @@ def generate_ansible_template_vars(path):
b_path = to_bytes(path)
try:
template_uid = pwd.getpwuid(os.stat(b_path).st_uid).pw_name
except:
except (KeyError, TypeError):
template_uid = os.stat(b_path).st_uid
temp_vars = {}