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

Unified Diff: gclient_utils.py

Issue 3192001: Force LANGUAGE=en to fix svn output parsing (Closed)
Patch Set: fix unit tests Created 10 years, 4 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/gclient_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 19a39a69d822783bf36f22f6b7ac3aca6841bb35..1efa036f6e99b970dea91e4d6d0c3b96e368e90f 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -49,10 +49,13 @@ def CheckCall(command, cwd=None, print_error=True):
stderr = None
if not print_error:
stderr = subprocess.PIPE
+ env = os.environ.copy()
+ env['LANGUAGE'] = 'en'
process = subprocess.Popen(command, cwd=cwd,
shell=sys.platform.startswith('win'),
stdout=subprocess.PIPE,
- stderr=stderr)
+ stderr=stderr,
+ env=env)
std_out, std_err = process.communicate()
except OSError, e:
raise CheckCallError(command, cwd, e.errno, None)
@@ -272,13 +275,15 @@ def SubprocessCallAndFilter(command,
if print_messages:
print('\n________ running \'%s\' in \'%s\''
% (' '.join(command), in_directory))
+ env = os.environ.copy()
+ env['LANGUAGE'] = 'en'
# *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.
kid = subprocess.Popen(command, bufsize=0, cwd=in_directory,
shell=(sys.platform == 'win32'), stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
+ stderr=subprocess.STDOUT, env=env)
# Do a flush of sys.stdout before we begin reading from the subprocess's
# stdout.
« no previous file with comments | « no previous file | tests/gclient_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698