diff piecrust/data/paginator.py @ 316:eb958151c8dc

tests: Bad me, the tests were broken. Now they're fixed.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 28 Mar 2015 12:41:02 -0700
parents b7ab1b503510
children 498a917cd2d4
line wrap: on
line diff
--- a/piecrust/data/paginator.py	Fri Mar 27 20:47:31 2015 -0700
+++ b/piecrust/data/paginator.py	Sat Mar 28 12:41:02 2015 -0700
@@ -212,7 +212,7 @@
     def _getPageUri(self, index):
         uri = self._uri
         if index > 1:
-            if not uri.endswith('/'):
+            if len(uri) > 0 and not uri.endswith('/'):
                 uri += '/'
             uri += str(index)
         return uri