Bug 672127 - coloring of help message should be disabled if stdOUT is not a tty.
coloring of help message should be disabled if stdOUT is not a tty.
Product: Fedora
Classification: Fedora
Component: sos (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jean-Francois Saucier
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-01-23 22:50 EST by Masatake YAMATO
Modified: 2011-02-14 10:25 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-02-11 11:25:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A patch fix the issue. (470 bytes, patch)
2011-01-23 22:50 EST, Masatake YAMATO
no flags Details | Diff

  None (edit)
Description Masatake YAMATO 2011-01-23 22:50:27 EST
Created attachment 474888 [details]
A patch fix the issue.

Description of problem:

 It is hard to read the output of "sosreport -l" if it is stored
to file or is connected to the other command like "less" because
escape characters for coloring are included in the output.

Version-Release number of selected component (if applicable):

The laster from svn repository.

How reproducible:

  sosrepor -l > /tmp/foo
  less /tmp/foo

Steps to Reproduce:
Actual results:

Escape characters for coloring are included.

Expected results:

Escape characters for coloing are not included only when
the stdout of sosreport is not connected to a terminal.
Additional info:
Comment 1 Pierre Carrier 2011-02-11 11:25:02 EST
Hello Masatake,

Thank you for your contribution!

I'd rather not modify __cmdLineOpts__ outside of command-line options, but reused sys.stdout.isatty().

Fixed upstream through https://fedorahosted.org/sos/changeset/1084

Pierre Carrier, Technical Support Engineer
Production Support, EMEA office
Global Support Services
Red Hat, Inc.
Comment 2 Masatake YAMATO 2011-02-13 23:00:45 EST
Thank you for fixing.
Just a question. Why "Component" field for this bugzilla entry is changed from sos to 0xFFFF?
Comment 3 Pierre Carrier 2011-02-14 04:21:55 EST
Sorry, that's a browser-side bug.
Comment 4 Bryn M. Reeves 2011-02-14 10:25:06 EST
Oh, you should file a bug! What package is it??

Note You need to log in before you can comment on or make changes to this bug.