diff options
author | Shane Bradley <sbradley@redhat.com> | 2016-01-22 09:48:34 -0500 |
---|---|---|
committer | Shane Bradley <sbradley@redhat.com> | 2016-01-22 09:48:34 -0500 |
commit | 605a035205240231aec64f86a9de2f3a329a7a3b (patch) | |
tree | 76c4cc1982c8f00b199d8df5490c06681ef5c6c8 | |
parent | 86cfad45503461b99c29a4f982159382c1c56179 (diff) | |
download | sos-605a035205240231aec64f86a9de2f3a329a7a3b.tar.gz |
[redhat] A managled rhn systemid will crash sosreport.
Fixes: #742
Signed-off-by: Shane Bradley <sbradley@redhat.com>
-rw-r--r-- | sos/policies/redhat.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py index 9decd0a7..44cc5ff6 100644 --- a/sos/policies/redhat.py +++ b/sos/policies/redhat.py @@ -183,9 +183,9 @@ No changes will be made to system configuration. def rhn_username(self): try: # cfg = config.initUp2dateConfig() - - return rpclib.xmlrpclib.loads( + rhn_username = rpclib.xmlrpclib.loads( up2dateAuth.getSystemId())[0][0]['username'] + return rhn_username.encode('utf-8', 'ignore') except: # ignore any exception and return an empty username return "" |