maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH 08/22] indexlib: do not raise exception when ind


From: Thomas Petazzoni
Subject: [Maposmatic-dev] [PATCH 08/22] indexlib: do not raise exception when index is empty
Date: Fri, 30 Mar 2012 13:00:25 +0200

The StreetIndex constructor was raising an exception when no street
was found. With the multi-page renderer, it is very possible to have
pages of map without any street or other elements to put in the index,
but for convenience we still want to get a StreetIndex object, even if
its ._categories list is empty.

Signed-off-by: Thomas Petazzoni <address@hidden>
---
 ocitysmap2/indexlib/indexer.py |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/ocitysmap2/indexlib/indexer.py b/ocitysmap2/indexlib/indexer.py
index a840820..8f1cc53 100644
--- a/ocitysmap2/indexlib/indexer.py
+++ b/ocitysmap2/indexlib/indexer.py
@@ -65,9 +65,6 @@ class StreetIndex:
              + self._list_amenities(db, polygon_wkt)
              + self._list_villages(db, polygon_wkt))
 
-        if not self._categories:
-            raise commons.IndexEmptyError("Nothing to index")
-
     @property
     def categories(self):
         return self._categories
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]