changeset 11752:12998fd17fbc stable

verify: report exceptions that don't have a str() method
author Matt Mackall <mpm@selenic.com>
date Thu, 05 Aug 2010 16:17:17 -0500
parents 28a450e1f54c
children eb7b04657dae
files mercurial/verify.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/verify.py	Mon Aug 02 13:30:03 2010 -0500
+++ b/mercurial/verify.py	Thu Aug 05 16:17:17 2010 -0500
@@ -48,6 +48,8 @@
         if isinstance(inst, KeyboardInterrupt):
             ui.warn(_("interrupted"))
             raise
+        if not str(inst):
+            inst = repr(inst)
         err(linkrev, "%s: %s" % (msg, inst), filename)
 
     def warn(msg):