Add specific exceptions to except

pull/4420/head
Joren Vrancken 2018-07-31 10:54:04 +02:00 committed by Brian Coca
parent f968fcd288
commit 7c13c4b207
1 changed files with 1 additions and 1 deletions

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 = {}