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

Unified Diff: recipe_engine/third_party/expect_tests/serialize.py

Issue 2088343002: improve unicode support (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Copyright Created 4 years, 6 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 | « recipe_engine/stream.py ('k') | recipes/engine_tests/unicode.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/third_party/expect_tests/serialize.py
diff --git a/recipe_engine/third_party/expect_tests/serialize.py b/recipe_engine/third_party/expect_tests/serialize.py
index 7324a47b9d1a006a7051f4cef97c47e05e2be6b6..95d17ffd8e88180a9d181cc3dd6b96f45a21980e 100644
--- a/recipe_engine/third_party/expect_tests/serialize.py
+++ b/recipe_engine/third_party/expect_tests/serialize.py
@@ -28,8 +28,8 @@ def re_encode(obj):
return {re_encode(k): re_encode(v) for k, v in obj.iteritems()}
elif isinstance(obj, list):
return [re_encode(i) for i in obj]
- elif isinstance(obj, unicode):
- return obj.encode('utf-8')
+ elif isinstance(obj, str):
+ return obj.decode('utf-8')
else:
return obj
« no previous file with comments | « recipe_engine/stream.py ('k') | recipes/engine_tests/unicode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698