acn/rtx
acn
/
rtx
1
0
Fork 0

Dateierweiterung .cept wird jetzt auch akzeptiert

This commit is contained in:
Anna Christina Naß 2018-06-01 15:00:57 +02:00
parent 5c0bae1a81
commit 536bdf96a8
1 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class rtxPage:
def exists(page):
""" checks if the page (i.e. the file) exists """
for path in config.PAGES:
if os.path.isfile(path + page):
if os.path.isfile(path + page) or os.path.isfile(path + page + ".cept"):
return True
return False
@ -81,6 +81,10 @@ class rtxPage:
filename = path + page
""" page has been found, now exit the for loop """
break
if os.path.isfile(path + page + ".cept"):
filename = path + page + ".cept"
""" page has been found - with .cept extension """
break
else:
""" page does not exist anywhere, so exit the function """
return False