diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-03-25 17:26:11 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-03-25 17:26:11 +0000 |
commit | eb2b77cc38130882db71b73a5a026a454d261684 (patch) | |
tree | 9e0ced778f4728c9b833582af36df6de70374da2 /tests/plugin_tests.py | |
parent | f617db3b8232c5864726c60b11a91162409d867f (diff) | |
download | sos-eb2b77cc38130882db71b73a5a026a454d261684.tar.gz |
Fix plugin_test exception on six.PY2
Replace explicit test for six.PY2 with try/exception handling of
StringIO import.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'tests/plugin_tests.py')
-rw-r--r-- | tests/plugin_tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py index c4b540fa..31ffae40 100644 --- a/tests/plugin_tests.py +++ b/tests/plugin_tests.py @@ -4,9 +4,9 @@ import tempfile # PYCOMPAT import six -if six.PY2: +try: from StringIO import StringIO -else: +except: from io import StringIO from sos.plugins import Plugin, regex_findall, sos_relative_path, mangle_command |