diff options
Diffstat (limited to 'sphinx/builders/linkcheck.py')
-rw-r--r-- | sphinx/builders/linkcheck.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 171e68d5b..88149ed04 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -153,7 +153,7 @@ class CheckExternalLinksBuilder(Builder): req = HeadRequest(req_url) f = opener.open(req, **kwargs) f.close() - except HTTPError, err: + except HTTPError as err: if err.code != 405: raise # retry with GET if that fails, some servers @@ -162,7 +162,7 @@ class CheckExternalLinksBuilder(Builder): f = opener.open(req, **kwargs) f.close() - except Exception, err: + except Exception as err: self.broken[uri] = str(err) return 'broken', str(err), 0 if f.url.rstrip('/') == req_url.rstrip('/'): |