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=''):
607
607
# XXX Others too ?
608
608
return default
609
609
610
- import subprocess
610
+ try :
611
+ import subprocess
612
+ except ImportError :
613
+ return default
611
614
target = _follow_symlinks (target )
612
615
# "file" output is locale dependent: force the usage of the C locale
613
616
# to get deterministic behavior.
@@ -746,7 +749,10 @@ def from_subprocess():
746
749
"""
747
750
Fall back to `uname -p`
748
751
"""
749
- import subprocess
752
+ try :
753
+ import subprocess
754
+ except ImportError :
755
+ return None
750
756
try :
751
757
return subprocess .check_output (
752
758
['uname' , '-p' ],
Original file line number Diff line number Diff line change @@ -1556,6 +1556,8 @@ def getpager():
1556
1556
return plainpager
1557
1557
if not sys .stdin .isatty () or not sys .stdout .isatty ():
1558
1558
return plainpager
1559
+ if sys .platform == "emscripten" :
1560
+ return plainpager
1559
1561
use_pager = os .environ .get ('MANPAGER' ) or os .environ .get ('PAGER' )
1560
1562
if use_pager :
1561
1563
if sys .platform == 'win32' : # pipes completely broken in Windows
You can’t perform that action at this time.
0 commit comments