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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/host.py

Issue 2143123004: Access environment variables through Host object instead of directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/host.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py
index 1003eeb64ba2aae02b6d65f2ecbb63f12f75d035..904ef08364cb124399a663e85ca499e5d9e9655b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py
@@ -28,7 +28,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import logging
-import os
import sys
from webkitpy.common.checkout.scm.detection import SCMDetector
@@ -73,10 +72,10 @@ class Host(SystemHost):
# messages and svn.py will fail to parse them.
# FIXME: We should do these overrides *only* for the subprocesses we know need them!
# This hack only works in unix environments.
- os.environ['LANGUAGE'] = 'en'
- os.environ['LANG'] = 'en_US.UTF-8'
- os.environ['LC_MESSAGES'] = 'en_US.UTF-8'
- os.environ['LC_ALL'] = ''
+ self.set_env('LANGUAGE', 'en')
+ self.set_env('LANG', 'en_US.UTF-8')
+ self.set_env('LC_MESSAGES', 'en_US.UTF-8')
+ self.set_env('LC_ALL', '')
# FIXME: This is a horrible, horrible hack for WinPort and should be removed.
# Maybe this belongs in Git in some more generic "find the git binary" codepath?

Powered by Google App Engine
This is Rietveld 408576698