changeset 2398:019e3bfa96ee

Make sure the page exists in all_pages
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sun, 12 May 2013 19:10:45 +0200
parents c458e6488535
children 9430e08ac757
files hatta/storage.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hatta/storage.py	Sun May 12 18:00:24 2013 +0200
+++ b/hatta/storage.py	Sun May 12 19:10:45 2013 +0200
@@ -2,10 +2,8 @@
 # -*- coding: utf-8 -*-
 
 import datetime
-import errno
 import os
 import re
-import tempfile
 import thread
 import werkzeug
 import StringIO
@@ -372,7 +370,8 @@
             if (repo_file.startswith(self.repo_prefix) and
                 '/' not in repo_file[len(self.repo_prefix):]):
                 title = self._file_to_title(repo_file)
-                yield title
+                if title in self:
+                    yield title
 
     def changed_since(self, rev):
         """
@@ -491,5 +490,6 @@
         for repo_file in self._changectx():
             if repo_file.startswith(self.repo_prefix):
                 title = self._file_to_title(repo_file)
-                yield title
+                if title in self:
+                    yield title