diff -r d60678a567a9 -r 328739ea70c3 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Tue Jun 23 22:38:21 2015 -0700 +++ b/mercurial/hgweb/webcommands.py Tue Jun 23 22:20:08 2015 -0700 @@ -76,7 +76,7 @@ try: fctx = webutil.filectx(web.repo, req) - except error.LookupError, inst: + except error.LookupError as inst: try: content = manifest(web, req, tmpl) req.respond(HTTP_OK, web.ctype) @@ -160,7 +160,7 @@ return manifest(web, req, tmpl) try: return _filerevision(web, req, tmpl, webutil.filectx(web.repo, req)) - except error.LookupError, inst: + except error.LookupError as inst: try: return manifest(web, req, tmpl) except ErrorResponse: