diff options
Diffstat (limited to 'sphinx/builders/html.py')
-rw-r--r-- | sphinx/builders/html.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index d715607e4..b5ca56bd3 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -531,7 +531,7 @@ class StandaloneHTMLBuilder(Builder): try: copyfile(path.join(self.srcdir, src), path.join(self.outdir, '_images', dest)) - except Exception, err: + except Exception as err: self.warn('cannot copy image file %r: %s' % (path.join(self.srcdir, src), err)) @@ -546,7 +546,7 @@ class StandaloneHTMLBuilder(Builder): try: copyfile(path.join(self.srcdir, src), path.join(self.outdir, '_downloads', dest)) - except Exception, err: + except Exception as err: self.warn('cannot copy downloadable file %r: %s' % (path.join(self.srcdir, src), err)) @@ -773,7 +773,7 @@ class StandaloneHTMLBuilder(Builder): f.write(output) finally: f.close() - except (IOError, OSError), err: + except (IOError, OSError) as err: self.warn("error writing file %s: %s" % (outfilename, err)) if self.copysource and ctx.get('sourcename'): # copy the source file for the "show source" link |