Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/protocol.py @ 10951:5dc09507b90e stable
hgweb: fix attribute error in error response (issue2060)
author | Mark Determann <qwerty360@gmail.com> |
---|---|
date | Thu, 01 Apr 2010 22:04:30 +0100 |
parents | e3eff76552f1 |
children | db3f6f0e4e7d |
line wrap: on
line diff
--- a/mercurial/hgweb/protocol.py Thu Mar 04 14:32:01 2010 -0600 +++ b/mercurial/hgweb/protocol.py Thu Apr 01 22:04:30 2010 +0100 @@ -179,6 +179,8 @@ raise ErrorResponse(HTTP_OK, inst) except (OSError, IOError), inst: error = getattr(inst, 'strerror', 'Unknown error') + if not isinstance(error, str): + error = 'Error: %s' % str(error) if inst.errno == errno.ENOENT: code = HTTP_NOT_FOUND else: