From 488e3dae349c7173d1d8b9c37ec791105b6c3835 Mon Sep 17 00:00:00 2001 From: acn Date: Thu, 9 Jun 2016 13:24:31 +0200 Subject: [PATCH] small fixes on the "check if next page exists" function --- rtxHelpers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtxHelpers.py b/rtxHelpers.py index 89b5453..a54e3c7 100644 --- a/rtxHelpers.py +++ b/rtxHelpers.py @@ -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: