Update exception handling to be python3 compat

This commit is contained in:
Toshio Kuratomi 2015-07-08 08:58:07 -07:00
parent df09691a38
commit ddac6fa9f3

View file

@ -378,7 +378,7 @@ class VaultFile(object):
raise errors.AnsibleError("%s does not exist" % self.filename) raise errors.AnsibleError("%s does not exist" % self.filename)
try: try:
self.filehandle = open(filename, "rb") self.filehandle = open(filename, "rb")
except Exception, e: except Exception as e:
raise errors.AnsibleError("Could not open %s: %s" % (self.filename, str(e))) raise errors.AnsibleError("Could not open %s: %s" % (self.filename, str(e)))
_, self.tmpfile = tempfile.mkstemp() _, self.tmpfile = tempfile.mkstemp()