File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -607,7 +607,10 @@ def _syscmd_file(target, default=''):
607607 # XXX Others too ?
608608 return default
609609
610- import subprocess
610+ try :
611+ import subprocess
612+ except ImportError :
613+ return default
611614 target = _follow_symlinks (target )
612615 # "file" output is locale dependent: force the usage of the C locale
613616 # to get deterministic behavior.
@@ -746,7 +749,10 @@ def from_subprocess():
746749 """
747750 Fall back to `uname -p`
748751 """
749- import subprocess
752+ try :
753+ import subprocess
754+ except ImportError :
755+ return None
750756 try :
751757 return subprocess .check_output (
752758 ['uname' , '-p' ],
Original file line number Diff line number Diff line change @@ -1556,6 +1556,8 @@ def getpager():
15561556 return plainpager
15571557 if not sys .stdin .isatty () or not sys .stdout .isatty ():
15581558 return plainpager
1559+ if sys .platform == "emscripten" :
1560+ return plainpager
15591561 use_pager = os .environ .get ('MANPAGER' ) or os .environ .get ('PAGER' )
15601562 if use_pager :
15611563 if sys .platform == 'win32' : # pipes completely broken in Windows
You can’t perform that action at this time.
0 commit comments