backend/common/rhnTB.py | 6 +++++-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 7187d783e5b2f10d27a3965a7dc3b6e237edd23d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 2 09:51:41 2013 +0200
Automatic commit of package [spacewalk-backend] release [2.1.3-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 50c284e..8654e28 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 2.1.2
+Version: 2.1.3
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -639,6 +639,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri Aug 02 2013 Michael Mraka <michael.mraka(a)redhat.com> 2.1.3-1
+- handle unicode tracebacks
+
* Mon Jul 29 2013 Stephen Herr <sherr(a)redhat.com> 2.1.2-1
- 960550 - the "Deploy confguration files" box is never checked for kickstarts
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 2723f41..ce38790 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-2.1.2-1 backend/
+2.1.3-1 backend/
commit a8fa7557edb36e5099c8cbe72cad7479c605f03f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 2 09:48:57 2013 +0200
handle unicode tracebacks
fixing
...
File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py",
line 175, in call_function
Traceback(method, self.req, severity="unhandled")
File "/usr/lib/python2.6/site-packages/spacewalk/common/rhnTB.py", line
150, in Traceback
ostream.write("%s\\n" % exc.getvalue().encode('utf-8'))
File "/usr/lib64/python2.6/StringIO.py", line 270, in getvalue
self.buf += ''.join(self.buflist)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48:
ordinal not in range(128)
diff --git a/backend/common/rhnTB.py b/backend/common/rhnTB.py
index ec06007..5460b81 100644
--- a/backend/common/rhnTB.py
+++ b/backend/common/rhnTB.py
@@ -147,7 +147,11 @@ def Traceback(method = None, req = None, mail = 1, ostream =
sys.stderr,
# we always log it somewhere
if ostream:
- ostream.write("%s\n" % exc.getvalue().encode('utf-8'))
+ msg = exc.getvalue()
+ if isinstance(msg, unicode):
+ msg = the_value.encode('utf-8')
+ ostream.write("%s\n" % msg)
+
if mail:
# print the stack frames for the mail we send out