mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-13 07:56:14 +01:00
check if stdout is a tty before call pager
Check if stdout is a tty before call pager otherwise simply print the text out. Signed-off-by: Danny Kukawka <danny.kukawka@web.de>
This commit is contained in:
parent
5a19362570
commit
23274b58d4
@ -2481,8 +2481,11 @@ def read_meta_from_spec(specfile, *args):
|
||||
return spec_data
|
||||
|
||||
def run_pager(message):
|
||||
import tempfile
|
||||
import tempfile, sys
|
||||
|
||||
if not sys.stdout.isatty:
|
||||
print message
|
||||
else:
|
||||
tmpfile = None
|
||||
|
||||
if tmpfile is None:
|
||||
|
Loading…
Reference in New Issue
Block a user