diff options
author | shane bradley <shanebradley@gmail.com> | 2016-01-22 12:57:59 -0500 |
---|---|---|
committer | shane bradley <shanebradley@gmail.com> | 2016-01-22 12:57:59 -0500 |
commit | 691e629359a23ca6cefbce8b3942c378a17c6b9c (patch) | |
tree | 76c4cc1982c8f00b199d8df5490c06681ef5c6c8 | |
parent | 86cfad45503461b99c29a4f982159382c1c56179 (diff) | |
parent | 605a035205240231aec64f86a9de2f3a329a7a3b (diff) | |
download | sos-691e629359a23ca6cefbce8b3942c378a17c6b9c.tar.gz |
Merge pull request #744 from sosreport/sbradley-rhn_managled_password
[redhat] A managled rhn systemid will crash sosreport.
-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 "" |