client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 661f8f4189dbbcfda7f46abeff916cb9e6ee54e6
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Mar 30 16:06:35 2012 +0200
804559 - not all msgs are CommunicationError objects
Some of the error messages being propagated are just ordinary strings.
diff --git a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
index be06576..80872d6 100644
--- a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
+++ b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py
@@ -43,7 +43,9 @@ def systemExit(code, msgs=None):
if type(msgs) not in [type([]), type(())]:
msgs = (msgs, )
for msg in msgs:
- sys.stderr.write(rhncli.utf8_encode(msg.value) + "\n")
+ if hasattr(msg, 'value'):
+ msg = msg.value
+ sys.stderr.write(rhncli.utf8_encode(msg) + "\n")
sys.exit(code)
# quick check to see if you are a super-user.
Show replies by date