use except Exception as e clause for Python 3 compatibility

pull/124/head
Kohei YOSHIDA 2018-02-19 23:32:36 +09:00
parent 3e6cc20cb2
commit baf3cd0c2c
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ class WebApp(object):
try:
convert(item.file, self.outfp, tmppath, pagenos=pagenos, codec=self.codec,
maxpages=self.MAXPAGES, maxfilesize=self.MAXFILESIZE, html=html)
except Exception, e:
except Exception as e:
self.put('<p>Sorry, an error has occurred: %s' % q(repr(e)))
self.logger.error('convert: %r: path=%r: %s' % (e, traceback.format_exc()))
finally: