mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-21 00:01:08 +00:00
Update exception handling to be python3 compat
This commit is contained in:
@@ -378,7 +378,7 @@ class VaultFile(object):
|
||||
raise errors.AnsibleError("%s does not exist" % self.filename)
|
||||
try:
|
||||
self.filehandle = open(filename, "rb")
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
raise errors.AnsibleError("Could not open %s: %s" % (self.filename, str(e)))
|
||||
|
||||
_, self.tmpfile = tempfile.mkstemp()
|
||||
|
||||
Reference in New Issue
Block a user