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

Unified Diff: gclient.py

Issue 167443002: Don't put unicode strings into the environment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index e2491cef1d39b1a80e6c6fcb3ae25fab676696bc..12d1f0f670ac1ddeca34c70fb8a53ad582d4e334 100755
--- a/gclient.py
+++ b/gclient.py
@@ -703,13 +703,14 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
scm = gclient_scm.GetScmName(parsed_url)
if not options.scm or scm in options.scm:
cwd = os.path.normpath(os.path.join(self.root.root_dir, self.name))
- # Pass in the SCM type as an env variable
+ # Pass in the SCM type as an env variable. Make sure we don't put
+ # unicode strings in the environment.
env = os.environ.copy()
if scm:
- env['GCLIENT_SCM'] = scm
+ env['GCLIENT_SCM'] = str(scm)
if parsed_url:
- env['GCLIENT_URL'] = parsed_url
- env['GCLIENT_DEP_PATH'] = self.name
+ env['GCLIENT_URL'] = str(parsed_url)
+ env['GCLIENT_DEP_PATH'] = str(self.name)
if options.prepend_dir and scm == 'git':
print_stdout = False
def filter_fn(line):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698