Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: subprocess2.py

Issue 6793044: Fix automatic shell detection, the check was reversed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/subprocess2_test.py » ('j') | tests/subprocess2_test.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: subprocess2.py
diff --git a/subprocess2.py b/subprocess2.py
index f4a9a2f3983c73780336781fa0fb4c4c4d2a5e9a..acba499ae13d38fab3236ea61c0f518cb902826e 100644
--- a/subprocess2.py
+++ b/subprocess2.py
@@ -143,12 +143,11 @@ def Popen(args, **kwargs):
env = get_english_env(kwargs.get('env'))
if env:
kwargs['env'] = env
-
- if not kwargs.get('shell') is None:
+ if kwargs.get('shell') is None:
# *Sigh*: Windows needs shell=True, or else it won't search %PATH% for the
# executable, but shell=True makes subprocess on Linux fail when it's called
# with a list because it only tries to execute the first item in the list.
- kwargs['shell'] = (sys.platform=='win32')
+ kwargs['shell'] = bool(sys.platform=='win32')
Dirk Pranke 2011/04/05 21:18:49 don't think you need the case here.
tmp_str = ' '.join(args)
if kwargs.get('cwd', None):
« no previous file with comments | « no previous file | tests/subprocess2_test.py » ('j') | tests/subprocess2_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698