From 07da6b3241c00b0f33f911ed8559ab82aee0eed5 Mon Sep 17 00:00:00 2001 From: palewire Date: Tue, 20 Jun 2017 21:37:23 -0700 Subject: [PATCH] Passing the tests now too --- bigbuild/management/commands/cachepages.py | 2 +- bigbuild/models/pagelists.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bigbuild/management/commands/cachepages.py b/bigbuild/management/commands/cachepages.py index 47d9bd3..d5c1d4e 100644 --- a/bigbuild/management/commands/cachepages.py +++ b/bigbuild/management/commands/cachepages.py @@ -28,5 +28,5 @@ def handle(self, *args, **options): # Save the archived pages out to a new cache with io.open(archive_cache_path, 'w', encoding='utf8') as f: - data = serializer.serialize(page_list) + data = serializer.serialize(page_list.archived_pages) f.write(six.text_type(data)) diff --git a/bigbuild/models/pagelists.py b/bigbuild/models/pagelists.py index 6a0e284..71cb0ec 100644 --- a/bigbuild/models/pagelists.py +++ b/bigbuild/models/pagelists.py @@ -132,10 +132,10 @@ def get_archived_pages(self): logger.debug("Loading cached archived page list") with open(self.archived_cache_path, 'r') as f: page_list = [] - dobj_list = BigBuildJSONDeserializer(f.read()) - for dobj in dobj_list: - if dobj.object.should_build(): - page_list.append(dobj.object) + obj_list = [o.object for o in BigBuildJSONDeserializer(f.read())] + for obj in obj_list: + if obj.should_build(): + page_list.append(obj) # Otherwise get them from the YAML else: logger.debug("Retrieving YAML archived page list")