aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-01-24 15:42:53 +0000
committerBryn M. Reeves <bmr@redhat.com>2014-01-24 15:42:53 +0000
commitc59877c45b0cf868a78ede66c5fe0b6df2b613d6 (patch)
tree72e170fa5df0c6bba63209624db20b64e89fa69c
parentb966cea77e9df3e5309cebefd2412cd780f9680f (diff)
downloadsos-c59877c45b0cf868a78ede66c5fe0b6df2b613d6.tar.gz
Tidy up formatting of UI preamble text
The formatting of the template preamble used a narrow terminal width since there is no native python method for obtaining the actual terminal geometry and the common methods for doing this are non-portable (e.g. Windows specific ioctls or shelling out to stty). This causes the top of the message to scroll off the screen on a standard 80x25 terminal (e.g. putty or a non-resized gnome-terminal or xterm window). Remove the paragraph indentation and increase the assumed width from 58 to 72 chars. This causes the message to fill a standard 80x25 terminal without scrolling. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/policies/__init__.py22
-rw-r--r--sos/policies/redhat.py20
2 files changed, 13 insertions, 29 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index 120d13cb..c272e5c6 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -117,17 +117,21 @@ class PackageManager(object):
class Policy(object):
msg = _("""\
-This command will collect system configuration and diagnostic information \
-from this %(distro)s system. An archive containing the collected information \
-will be generated in %(tmpdir)s.
+This command will collect diagnostic and configuration \
+information from this %(distro)s system and installed \
+applications.
-For more information on %(vendor)s visit:
+An archive containing the collected information will be \
+generated in %(tmpdir)s and may be provided to a %(vendor)s \
+support representative.
+Any information provided to %(vendor)s will be treated in \
+accordance with the published support policies at:\n
%(vendor_url)s
-The generated archive may contain data considered sensitive and its content \
-should be reviewed by the originating organization before being passed to \
-any third party.
+The generated archive may contain data considered sensitive \
+and its content should be reviewed by the originating \
+organization before being passed to any third party.
No changes will be made to system configuration.
%(vendor_text)s
@@ -298,14 +302,14 @@ No changes will be made to system configuration.
the user in non-batch mode. If your policy sets self.distro that
text will be substituted accordingly. You can also override this
method to do something more complicated."""
- width = 58
+ width = 72
_msg = self.msg % {'distro': self.distro, 'vendor': self.vendor,
'vendor_url': self.vendor_url,
'vendor_text': self.vendor_text,
'tmpdir': self.commons['tmpdir']}
_fmt = ""
for line in _msg.splitlines():
- _fmt = _fmt + fill(" " + line, width, replace_whitespace = False) + '\n'
+ _fmt = _fmt + fill(line, width, replace_whitespace = False) + '\n'
return _fmt
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index 93218157..5b3a4468 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -91,26 +91,6 @@ class RedHatPolicy(LinuxPolicy):
return self.host_name()
class RHELPolicy(RedHatPolicy):
-
- msg = _("""\
-This command will collect system configuration and diagnostic information \
-from this %(distro)s system. An archive containing the collected information \
-will be generated in %(tmpdir)s and may be provided to a %(vendor)s support \
-representative or used for local diagnostic or recording purposes.
-
-Any information provided to %(vendor)s will be treated in strict confidence \
-in accordance with the published support policies at:
-
- %(vendor_url)s
-
-The generated archive may contain data considered sensitive and its content \
-should be reviewed by the originating organization before being passed to \
-any third party.
-
-No changes will be made to system configuration.
-%(vendor_text)s
-""")
-
distro = "Red Hat Enterprise Linux"
vendor = "Red Hat"
vendor_url = "https://access.redhat.com/support/"