acn/rtx
acn
/
rtx
1
0
Fork 0

small fixes on the "check if next page exists" function

This commit is contained in:
acn 2016-06-09 13:24:31 +02:00
parent b245761134
commit 488e3dae34
1 changed files with 4 additions and 2 deletions

View File

@ -100,10 +100,12 @@ def process_command(cmd):
else:
# check if the next page exists, e.g. 2000a => 2000b
curid = glob.curpage.get_page_id()
if curid[-1:].isalpha():
if curid == -1:
send_error("Keine n"+cept['UMLAUT']+"achste Seite gefunden.")
if str(curid[-1:]).isalpha():
# aus 2000a 2000b machen:
nextid = curid[:-1] + chr(ord(curid[-1:])+1)
check_and_send_page(nextid, "Keine n"+str(cept['UMLAUT'])+"achste Seite gefunden.")
check_and_send_page(nextid, "Keine n"+cept['UMLAUT']+"achste Seite gefunden.")
# special commands:
if cmd == "!1" + cept.TER: