try executing 'less' in a parenthesized subshell - prevents systems like
Solaris from squawking if less isn't available. See http://python.org/sf/612111 for details.
This commit is contained in:
parent
479f3d3d2a
commit
d404bee2e2
|
@ -1199,7 +1199,7 @@ def getpager():
|
|||
return lambda text: pipepager(text, os.environ['PAGER'])
|
||||
if sys.platform == 'win32' or sys.platform.startswith('os2'):
|
||||
return lambda text: tempfilepager(plain(text), 'more <')
|
||||
if hasattr(os, 'system') and os.system('less 2>/dev/null') == 0:
|
||||
if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:
|
||||
return lambda text: pipepager(text, 'less')
|
||||
|
||||
import tempfile
|
||||
|
|
Loading…
Reference in New Issue