1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

pager should not log

fixes #25719
This commit is contained in:
Brian Coca 2017-06-15 10:45:01 -04:00
parent 83703e3137
commit df2fcecd62

View file

@ -611,10 +611,10 @@ class CLI(with_metaclass(ABCMeta, object)):
''' find reasonable way to display text '''
# this is a much simpler form of what is in pydoc.py
if not sys.stdout.isatty():
display.display(text)
display.display(text, screen_only=True)
elif 'PAGER' in os.environ:
if sys.platform == 'win32':
display.display(text)
display.display(text, screen_only=True)
else:
self.pager_pipe(text, os.environ['PAGER'])
else:
@ -623,7 +623,7 @@ class CLI(with_metaclass(ABCMeta, object)):
if p.returncode == 0:
self.pager_pipe(text, 'less')
else:
display.display(text)
display.display(text, screen_only=True)
@staticmethod
def pager_pipe(text, cmd):