diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/subprocess.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index c40f017..809e59f 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1204,7 +1204,10 @@ class Popen(object): args = list(args) if shell: - args = ["/bin/sh", "-c"] + args + # On Android the default shell is at '/system/bin/sh'. + unix_shell = ('/system/bin/sh' if + hasattr(sys, 'getandroidapilevel') else '/bin/sh') + args = [unix_shell, "-c"] + args if executable: args[0] = executable |