changeset 10:b6259e713533

fixed another bug
author Atul Varma <varmaa@toolness.com>
date Thu, 31 Dec 2009 15:56:39 -0800
parents 9d6306907982
children 428d45a1ef44
files test.py whoisi_cache.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test.py	Thu Dec 31 15:43:25 2009 -0800
+++ b/test.py	Thu Dec 31 15:56:39 2009 -0800
@@ -11,7 +11,7 @@
         self._people = people
 
     def get_max_person_id(self, app):
-        return len(self._people)
+        return {'person_id': len(self._people)}
 
     def _validate_index(self, index):
         if index <= 0 or index > self.get_max_person_id(None):
--- a/whoisi_cache.py	Thu Dec 31 15:43:25 2009 -0800
+++ b/whoisi_cache.py	Thu Dec 31 15:56:39 2009 -0800
@@ -59,7 +59,7 @@
             self.people[person_id] = result['person']
 
     def update(self):
-        pid = self.server.get_max_person_id(app=self.APP_NAME)
+        pid = self.server.get_max_person_id(app=self.APP_NAME)['person_id']
         interval = range(len(self.people) + 1, pid + 1)
         subintervals = split_seq(interval, self.batch_size)
         for subinterval in subintervals: