client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 400df68c3498fc4800aa449e1ed9dc2226542e1c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jun 17 17:10:02 2011 +0200
714113 - handle writing unicode to log file
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 661cd5c..b6afecb 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
@@ -54,8 +54,8 @@ class Log:
log_name = self.cfg["logFile"] or "/var/log/up2date"
log_file = open(log_name, 'a')
- msg = "%s %s\n" % (self.log_info, str(s))
- log_file.write(msg)
+ msg = u"%s %s\n" % (self.log_info, s)
+ log_file.write(msg.encode('utf-8'))
log_file.flush()
log_file.close()
Show replies by date