Handle storing of revision ID in metadir functions
authorIan Weller <ian@ianweller.org>
Tue, 22 Dec 2009 18:05:24 +0000 (12:05 -0600)
committerIan Weller <ian@ianweller.org>
Tue, 22 Dec 2009 18:05:24 +0000 (12:05 -0600)
src/mw/metadir.py

index 643024ecc9e7d3d8831360b749e8a615ec9800f2..e09c840276cf45bdb9a5fe6a5f693716f8606b69 100644 (file)
@@ -107,7 +107,8 @@ class Metadir(object):
         fd.close()
 
     def pages_get_rv_list(self, pageid):
         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()]
         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):
         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)]
         fd = file(pagefile, 'r')
         pagedata = json.loads(fd.read())
         return pagedata[str(rvid)]

Benjamin Mako Hill || Want to submit a patch?