[Python-checkins] cpython: - Issue #8637: Honor a pager set by the env var MANPAGER (in preference to
matthias.klose
python-checkins at python.org
Tue Jun 14 03:04:01 EDT 2016
https://hg.python.org/cpython/rev/dea9f9b5582b
changeset: 102013:dea9f9b5582b
user: doko at ubuntu.com
date: Tue Jun 14 09:03:52 2016 +0200
summary:
- Issue #8637: Honor a pager set by the env var MANPAGER (in preference to
one set by the env var PAGER).
files:
Lib/pydoc.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1432,11 +1432,11 @@
use_pager = os.environ.get('MANPAGER') or os.environ.get('PAGER')
if use_pager:
if sys.platform == 'win32': # pipes completely broken in Windows
- return lambda text: tempfilepager(plain(text), os.environ['PAGER'])
+ return lambda text: tempfilepager(plain(text), use_pager)
elif os.environ.get('TERM') in ('dumb', 'emacs'):
- return lambda text: pipepager(plain(text), os.environ['PAGER'])
+ return lambda text: pipepager(plain(text), use_pager)
else:
- return lambda text: pipepager(text, os.environ['PAGER'])
+ return lambda text: pipepager(text, use_pager)
if os.environ.get('TERM') in ('dumb', 'emacs'):
return plainpager
if sys.platform == 'win32':
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list