aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/policies/redhat.py2
-rw-r--r--tests/plugin_tests.py4
-rw-r--r--tests/utilities_tests.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index 14ccb31f..0618a420 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -62,7 +62,7 @@ class RedHatPolicy(LinuxPolicy):
# If rpm query failed, exit
if not self.pkgs:
- print("Could not obtain installed package list", file=sys.stderr)
+ sys.stderr.write("Could not obtain installed package list")
sys.exit(1)
self.usrmove = self.check_usrmove(self.pkgs)
diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py
index c88534d8..bc7f7cc8 100644
--- a/tests/plugin_tests.py
+++ b/tests/plugin_tests.py
@@ -117,13 +117,13 @@ class MockOptions(object):
class PluginToolTests(unittest.TestCase):
def test_regex_findall(self):
- test_s = "\n".join(['this is only a test', 'there are only two lines'])
+ test_s = u"\n".join(['this is only a test', 'there are only two lines'])
test_fo = StringIO(test_s)
matches = regex_findall(r".*lines$", test_fo)
self.assertEquals(matches, ['there are only two lines'])
def test_regex_findall_miss(self):
- test_s = "\n".join(['this is only a test', 'there are only two lines'])
+ test_s = u"\n".join(['this is only a test', 'there are only two lines'])
test_fo = StringIO(test_s)
matches = regex_findall(r".*not_there$", test_fo)
self.assertEquals(matches, [])
diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py
index 3513f42c..fa861563 100644
--- a/tests/utilities_tests.py
+++ b/tests/utilities_tests.py
@@ -19,7 +19,7 @@ TEST_DIR = os.path.dirname(__file__)
class GrepTest(unittest.TestCase):
def test_file_obj(self):
- test_s = "\n".join(['this is only a test', 'there are only two lines'])
+ test_s = u"\n".join(['this is only a test', 'there are only two lines'])
test_fo = StringIO(test_s)
matches = grep(".*test$", test_fo)
self.assertEquals(matches, ['this is only a test\n'])