client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit a0dc13c2597e62ba5cc3ac8562cbe87cbacfe713
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 5 14:00:20 2011 +0200
convert args to string first
fixing
...
File "/usr/share/rhn/up2date_client/up2dateLog.py", line 34, in log_me
i = unicode("%s" % i, 'utf-8')
<type 'exceptions.TypeError'>: not all arguments converted during string
formatting
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
index 8efa899..6daa772 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
@@ -31,7 +31,9 @@ class Log:
s = u""
for i in args:
if not isinstance(i, unicode):
- i = unicode(i, 'utf-8')
+ # we really need unicode(str(i)) here, because i can be anything
+ # from string or int to list, dict or even class
+ i = unicode(str(i), 'utf-8')
s += i
if self.cfg["debug"] > 1:
print s
Show replies by date