Commit ddac6fa9 by Toshio Kuratomi

Update exception handling to be python3 compat

parent df09691a
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment