maposmatic-dev
[Top][All Lists]
Advanced

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

[Maposmatic-dev] [PATCH 15/22] indexlib: properly differentiate the page


From: Thomas Petazzoni
Subject: [Maposmatic-dev] [PATCH 15/22] indexlib: properly differentiate the page_number=None and page_number=0 cases
Date: Fri, 30 Mar 2012 13:00:32 +0200

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

diff --git a/ocitysmap2/indexlib/commons.py b/ocitysmap2/indexlib/commons.py
index f327f30..2bdd4a8 100644
--- a/ocitysmap2/indexlib/commons.py
+++ b/ocitysmap2/indexlib/commons.py
@@ -146,10 +146,10 @@ class IndexItem:
         else:
             square_str = self.location_str
 
-        if self.page_number:
-            location_str = "%d, %s" % (self.page_number, square_str)
-        else:
+        if self.page_number is None:
             location_str = square_str
+        else:
+            location_str = "%d, %s" % (self.page_number, square_str)
 
         ctx.save()
         if not rtl:
-- 
1.7.4.1




reply via email to

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