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

Unified Diff: appengine/components/components/config/fs.py

Issue 2778533002: config: store binary configs (Closed)
Patch Set: addressed comments 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
Index: appengine/components/components/config/fs.py
diff --git a/appengine/components/components/config/fs.py b/appengine/components/components/config/fs.py
index 4ca06722f6bc02f46cb959ca68ed4c4643694f11..7cca4398d165802fe2c97b38537ed2dfcf1d2689 100644
--- a/appengine/components/components/config/fs.py
+++ b/appengine/components/components/config/fs.py
@@ -28,7 +28,7 @@ class Provider(object):
self.root = root
@ndb.tasklet
- def get_async(self, config_set, path, **kwargs):
+ def get_async(self, config_set, path, dest_type=None, **kwargs):
"""Reads a (revision, config) from a file, where revision is always None.
Kwargs are not used, but reported as warnings.
@@ -50,7 +50,8 @@ class Provider(object):
if os.path.exists(filename):
with open(filename, 'r') as f:
content = f.read()
- raise ndb.Return((None, content))
+ config = common._convert_config(content, dest_type)
+ raise ndb.Return(None, config)
def get_project_ids(self):
# A project_id cannot contain a slash, so recursion is not needed.
« no previous file with comments | « appengine/components/components/config/api_test.py ('k') | appengine/components/components/config/proto/project_config_pb2.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698