summaryrefslogtreecommitdiff
path: root/addons/web_editor/controllers/main.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-04-11 12:44:29 +0200
committerXavier Morel <xmo@odoo.com>2017-04-11 14:53:29 +0200
commit3979f6802eeea275f949d28ddf4c18f84fc0f5aa (patch)
tree0c67d60c80b2ece2e452837c187a79e9444334d8 /addons/web_editor/controllers/main.py
parentca74b5e1c8a48bcdeb396625ec0d8028a5a9d5f1 (diff)
[#8530] convert exception handlers to except..as syntax
Futurize fixers: * lib2to3.fixes.fix_except
Diffstat (limited to 'addons/web_editor/controllers/main.py')
-rw-r--r--addons/web_editor/controllers/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py
index 054850b0926..5a3eca776ef 100644
--- a/addons/web_editor/controllers/main.py
+++ b/addons/web_editor/controllers/main.py
@@ -173,7 +173,7 @@ class Web_Editor(http.Controller):
u"than 42 million pixel")
if not disable_optimization and image.format in ('PNG', 'JPEG'):
data = tools.image_save_for_web(image)
- except IOError, e:
+ except IOError as e:
pass
attachment = Attachments.create({
@@ -185,7 +185,7 @@ class Web_Editor(http.Controller):
})
attachments += attachment
uploads += attachments.read(['name', 'mimetype', 'checksum', 'url'])
- except Exception, e:
+ except Exception as e:
logger.exception("Failed to upload image to attachment")
message = unicode(e)