X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/95ac56f69ddb6de8e260c8e55aff68d1df0b452c..c9a51ec6920b556e2faf337a890cca04cc6a2141:/lib/actions/parseactions.py diff --git a/lib/actions/parseactions.py b/lib/actions/parseactions.py index 683febd9..2462a751 100644 --- a/lib/actions/parseactions.py +++ b/lib/actions/parseactions.py @@ -1,6 +1,6 @@ # takes a header file, outputs action ids -import token, tokenize, os, sys, string +import tokenize, sys, string def filter(g): while 1: @@ -48,6 +48,11 @@ def do_file(f, mode): if t == "enum" and state == classstate + 1: actionname = tokens.next() + if actionname == "{": + while tokens.next() != "}": + pass + continue + if actionname[-7:] == "Actions": if tokens.next() != "{": try: @@ -60,7 +65,7 @@ def do_file(f, mode): except: pass - raise "action enum must be simple." + raise Exception("action enum must be simple.") counter = 0 @@ -77,7 +82,7 @@ def do_file(f, mode): if counter: if t != ",": - raise "no comma" + raise Exception("no comma") t = tokens.next() if firsthit: