aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/policies/__init__.py5
-rw-r--r--sos/sosreport.py21
2 files changed, 14 insertions, 12 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index e666f0c7..46b41e0c 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -17,6 +17,7 @@ from sos.plugins import IndependentPlugin
from sos import _sos as _
import hashlib
from textwrap import fill
+from six import print_
def import_policy(name):
policy_fqname = "sos.policies.%s" % name
@@ -354,9 +355,9 @@ No changes will be made to system configuration.
quiet mode"""
if not self.commons['cmdlineopts'].quiet:
if msg:
- print(msg)
+ print_(msg)
else:
- print()
+ print_()
def get_msg(self):
diff --git a/sos/sosreport.py b/sos/sosreport.py
index 3605b81f..f297b670 100644
--- a/sos/sosreport.py
+++ b/sos/sosreport.py
@@ -58,6 +58,7 @@ if six.PY3:
from configparser import ConfigParser
else:
from ConfigParser import ConfigParser
+from six import print_
class TempFileUtil(object):
@@ -91,15 +92,15 @@ class OptionParserExtended(OptionParser):
def print_help(self, out=sys.stdout):
""" Prints help content including examples """
OptionParser.print_help(self, out)
- print()
- print( "Some examples:")
- print()
- print( " enable cluster plugin only and collect dlm lockdumps:")
- print( " # sosreport -o cluster -k cluster.lockdump")
- print()
- print( " disable memory and samba plugins, turn off rpm -Va collection:")
- print( " # sosreport -n memory,samba -k rpm.rpmva=off")
- print()
+ print_()
+ print_( "Some examples:")
+ print_()
+ print_( " enable cluster plugin only and collect dlm lockdumps:")
+ print_( " # sosreport -o cluster -k cluster.lockdump")
+ print_()
+ print_( " disable memory and samba plugins, turn off rpm -Va collection:")
+ print_( " # sosreport -n memory,samba -k rpm.rpmva=off")
+ print_()
class SosOption(Option):
"""Allow to specify comma delimited list of plugins"""
@@ -631,7 +632,7 @@ class SoSReport(object):
import traceback, pdb
# we are NOT in interactive mode, print the exception...
traceback.print_exception(etype, eval_, etrace, limit=2, file=sys.stdout)
- print
+ print_()
# ...then start the debugger in post-mortem mode.
pdb.pm()