Skip to content

Commit 4561e9f

Browse files
jdcaballerovmgautierfr
authored andcommitted
Simplify long url check
1 parent 2ecdc70 commit 4561e9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libzim/libzim.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ cdef class ZimCreator:
218218
def main_page(self,new_url):
219219
"""Set the main page of the ZimCreator object"""
220220
# Check if url longformat is used
221-
if new_url.find('/') == 1:
221+
if new_url[1] == '/':
222222
raise ValueError("Url should not include a namespace")
223223

224224
self.c_creator.setMainUrl(new_url.encode('UTF-8'))

0 commit comments

Comments
 (0)