From: Ian Weller Date: Tue, 22 Dec 2009 18:05:24 +0000 (-0600) Subject: Handle storing of revision ID in metadir functions X-Git-Url: https://projects.mako.cc/source/mw/commitdiff_plain/2c860f8d2f73c9d7322953b40b28927cef0187b9?ds=sidebyside Handle storing of revision ID in metadir functions --- diff --git a/src/mw/metadir.py b/src/mw/metadir.py index 643024e..e09c840 100644 --- a/src/mw/metadir.py +++ b/src/mw/metadir.py @@ -107,7 +107,8 @@ class Metadir(object): fd.close() def pages_get_rv_list(self, pageid): - pagefile = os.path.join(self.location, 'cache', 'pages', str(pageid)) + pagefile = os.path.join(self.location, 'cache', 'pages', + str(pageid['id'])) fd = file(pagefile, 'r') pagedata = json.loads(fd.read()) rvs = [int(x) for x in pagedata.keys()] @@ -115,7 +116,8 @@ class Metadir(object): return rvs def pages_get_rv(self, pageid, rvid): - pagefile = os.path.join(self.location, 'cache', 'pages', str(pageid)) + pagefile = os.path.join(self.location, 'cache', 'pages', + str(pageid['id'])) fd = file(pagefile, 'r') pagedata = json.loads(fd.read()) return pagedata[str(rvid)]