Use 'except ... as' syntax

This syntax works on Python 2.6 through 3.x.  lib/ansible/module_utils
(and lib/ansible/modules) need to support Python 2.4, so I didn't touch
those.
This commit is contained in:
Marius Gedminas 2015-08-27 09:16:11 +03:00
parent 2ac931d6c9
commit 0c6ce31f76
24 changed files with 51 additions and 51 deletions

View file

@ -242,7 +242,7 @@ class VariableManager:
break
else:
raise AnsibleError("vars file %s was not found" % vars_file_item)
except UndefinedError, e:
except UndefinedError as e:
continue
if not C.DEFAULT_PRIVATE_ROLE_VARS: