[test] take care to unicode __regid__ (usually when using _()), may lead to later unicode decode error
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Sun, 17 Oct 2010 10:04:45 +0200
changeset 6524 eca20b012104
parent 6523 67bff8734a5b
child 6525 8f4acaf2212c
[test] take care to unicode __regid__ (usually when using _()), may lead to later unicode decode error
devtools/testlib.py
--- a/devtools/testlib.py	Sun Oct 17 10:04:03 2010 +0200
+++ b/devtools/testlib.py	Sun Oct 17 10:04:45 2010 +0200
@@ -742,6 +742,7 @@
                 msg = '[%s in %s] %s' % (klass, view.__regid__, exc)
             except:
                 msg = '[%s in %s] undisplayable exception' % (klass, view.__regid__)
+            msg = str(msg) # ensure no unicode
             if output is not None:
                 position = getattr(exc, "position", (0,))[0]
                 if position: