[PATCH] Fix for issue 2060
qwerty360 at gmail.com
qwerty360 at gmail.com
Thu Apr 1 17:32:41 CDT 2010
# HG changeset patch
# User Mark Determann <qwerty360 at gmail.com>
# Date 1270155870 -3600
# Node ID 81da62c7f88d7afb1a068903c9727bc3102d54d4
# Parent ef3668450cd0075978e2d11ec991aab557d9c59c
Fix for issue 2060.
Ensures error message is a string with minimal meaning
diff -r ef3668450cd0 -r 81da62c7f88d mercurial/hgweb/protocol.py
--- a/mercurial/hgweb/protocol.py Tue Mar 30 13:09:25 2010 -0500
+++ 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:
More information about the Mercurial-devel
mailing list