diff -r 751135cca13c -r 0af2fe7b3274 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Thu Jan 31 01:44:29 2013 +0100 +++ b/mercurial/hgweb/hgweb_mod.py Thu Jan 31 22:30:52 2013 +0100 @@ -233,10 +233,10 @@ return content - except error.LookupError, err: + except (error.LookupError, error.RepoLookupError), err: req.respond(HTTP_NOT_FOUND, ctype) msg = str(err) - if 'manifest' not in msg: + if util.safehasattr(err, 'name') and 'manifest' not in msg: msg = 'revision not found: %s' % err.name return tmpl('error', error=msg) except (error.RepoError, error.RevlogError), inst: