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

Unified Diff: recipe_engine/fetch.py

Issue 2771723006: [recipes.cfg] ONLY support jsonpb. (Closed)
Patch Set: remove comment Created 3 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 | « doc/recipes.py ('k') | recipe_engine/package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/fetch.py
diff --git a/recipe_engine/fetch.py b/recipe_engine/fetch.py
index 50f82eb0aa0e38629007eaa83d218567b9fd53ff..d2503e2d03b8dd19d98e4941661280ad29866b03 100644
--- a/recipe_engine/fetch.py
+++ b/recipe_engine/fetch.py
@@ -21,7 +21,7 @@ from . import types
from .requests_ssl import requests
import subprocess42
-from google.protobuf import text_format
+from google.protobuf import json_format
from . import package_pb2
@@ -260,7 +260,8 @@ class GitilesBackend(Backend):
recipes_cfg_text = base64.b64decode(
self._fetch_gitiles(recipes_cfg_url).text)
recipes_cfg_proto = package_pb2.Package()
- text_format.Merge(recipes_cfg_text, recipes_cfg_proto)
+ json_format.Parse(recipes_cfg_text, recipes_cfg_proto,
+ ignore_unknown_fields=True)
recipes_path_rel = recipes_cfg_proto.recipes_path
# Re-create recipes.cfg in |checkout_dir| so that the repo's recipes.py
« no previous file with comments | « doc/recipes.py ('k') | recipe_engine/package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698