This commit is contained in:
Benjamin Peterson 2014-06-07 20:17:29 -07:00
commit eac219436c
3 changed files with 13 additions and 0 deletions

View file

@ -1415,6 +1415,8 @@ def pager(text):
def getpager():
"""Decide what method to use for paging through text."""
if not hasattr(sys.stdin, "isatty"):
return plainpager
if not hasattr(sys.stdout, "isatty"):
return plainpager
if not sys.stdin.isatty() or not sys.stdout.isatty():