From eb2b77cc38130882db71b73a5a026a454d261684 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 25 Mar 2014 17:26:11 +0000 Subject: 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 --- tests/plugin_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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 -- cgit