diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2016-09-09 09:21:23 +0200 |
---|---|---|
committer | Pavel Moravec <pmoravec@redhat.com> | 2016-09-09 09:21:23 +0200 |
commit | e62408838d08a962f1e1d6d8970b34ce1883a10c (patch) | |
tree | 3174d5631517cbed67f47e1444c17b180ff0e4a6 | |
parent | 470f62c658b37e1691cb87472a15880e9e4596a2 (diff) | |
download | sos-e62408838d08a962f1e1d6d8970b34ce1883a10c.tar.gz |
[reporting] replace six.PY2 to six.PY3 test
Older versions of python-six package dont have six.PY2 variable.
Replace it by six.PY3
Resolves: #875.
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/reporting.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sos/reporting.py b/sos/reporting.py index 23a50058..679284ea 100644 --- a/sos/reporting.py +++ b/sos/reporting.py @@ -149,10 +149,10 @@ class PlainTextReport(object): header, format_) output = u'\n'.join(map(lambda i: (i if isinstance(i, six.text_type) else six.u(i)), buf)) - if six.PY2: - return output.encode('utf8') - else: + if six.PY3: return output + else: + return output.encode('utf8') def process_subsection(self, section, key, header, format_): if key in section: |