do not crash when attributes are not present; replace by defaults instead
[vuplus_dvbapp] / lib / actions / parseactions.py
index 683febd..4ab71af 100644 (file)
@@ -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: