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

Unified Diff: build/gn_helpers.py

Issue 1851723002: Let gn_helpers.py handle unicode as str (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/gn_helpers.py
diff --git a/build/gn_helpers.py b/build/gn_helpers.py
index f1037720bbf878ac8cbaa56f0896aaec04ea5a62..6a61a0877f04e79ad200637515cf8efd245b711d 100644
--- a/build/gn_helpers.py
+++ b/build/gn_helpers.py
@@ -36,6 +36,9 @@ def ToGNString(value, allow_dicts = True):
value.replace('\\', '\\\\').replace('"', '\\"').replace('$', '\\$') + \
'"'
+ if isinstance(value, unicode):
+ return ToGNString(value.encode('utf-8'))
+
if isinstance(value, bool):
if value:
return "true"
« 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