From: Aline Manera <alinefm(a)br.ibm.com>
The unicode() operation is only available for strings.
So make sure the exception argument is a string before converting it to
unicode.
Signed-off-by: Aline Manera <alinefm(a)br.ibm.com>
---
src/kimchi/exception.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kimchi/exception.py b/src/kimchi/exception.py
index 71a4d11..74134be 100644
--- a/src/kimchi/exception.py
+++ b/src/kimchi/exception.py
@@ -51,7 +51,7 @@ class KimchiException(Exception):
for key, value in args.iteritems():
if not isinstance(value, unicode):
- args[key] = unicode(value, 'utf-8')
+ args[key] = unicode(str(value), 'utf-8')
return unicode(translation.gettext(text), 'utf-8') % args
--
1.7.10.4