From 2c860f8d2f73c9d7322953b40b28927cef0187b9 Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Tue, 22 Dec 2009 12:05:24 -0600 Subject: [PATCH] Handle storing of revision ID in metadir functions --- src/mw/metadir.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)] -- 2.39.5