Merge remote branch 'remotes/origin/acid-burn/bug_622_swupgrade_networkcheck'
[vuplus_dvbapp] / lib / actions / parseactions.py
index d0c1aec..cad432a 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:
@@ -65,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
                        
@@ -82,14 +82,14 @@ def do_file(f, mode):
                                        
                                        if counter:
                                                if t != ",":
-                                                       raise "no comma"
+                                                       raise Exception("no comma")
                                                t = tokens.next()
                                
                                        if firsthit:
 
                                                if mode == "include":
                                                        # hack hack hack!!
-                                                       print "#include <lib" + f[2:] + ">"
+                                                       print "#include <lib/" + '/'.join(f.split('/')[-2:]) + ">"
                                                else:
                                                        print "\t// " + f