Merge pull request #124 from yosida95/except-stmt

Use except Exception as e clause for Python 3 compatibility
pull/123/head
Tata Ganesh 2018-03-19 10:44:35 +05:30 committed by GitHub
commit a66f1285ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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