diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-10-03 17:57:42 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-10-03 17:57:42 +0100 |
commit | dcc0b35431bc3fc134bca77903227ecb74672cb5 (patch) | |
tree | 279b37741a7ecbf615db545b665c642d0bb77ea2 /debian/watch | |
parent | d79cec6ac30a8ffb5c6d2ac0afa47811e192c1de (diff) | |
download | sos-dcc0b35431bc3fc134bca77903227ecb74672cb5.tar.gz |
No TTY should not imply batch mode
Commit 6ea48cbb introduced an isatty() check on stdin and
automatically sets batch mode if we're not attached to a TTY.
Although the logic of this seems simple enough the combination of
this and commit 4b46e04 breaks valid uses that have worked since
sos-1.x, e.g.:
Traceback (most recent call last):
File "/usr/sbin/sosreport", line 23, in <module>
main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1171, in main
sos.execute()
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1133, in execute
self._setup_logging()
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 630, in _setup_logging
self.opts.batch = True
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 324, in batch
self._check_options_initialized()
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 229, in _check_options_initialized
+ "from command line")
ValueError: SoSOptions object already initialized from command line
Given the actual semantics of --batch (do not prompt for or read
user input from stdin) there is no need to enable it if stdin is
a pipe or other non-TTY file descriptor.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'debian/watch')
0 files changed, 0 insertions, 0 deletions