gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r25928 - monkey/trunk/seaspider


From: gnunet
Subject: [GNUnet-SVN] r25928 - monkey/trunk/seaspider
Date: Mon, 28 Jan 2013 17:53:45 +0100

Author: teichm
Date: 2013-01-28 17:53:44 +0100 (Mon, 28 Jan 2013)
New Revision: 25928

Modified:
   monkey/trunk/seaspider/seasp2_convert
Log:
ignore patterns in seasp2_convert part2

Modified: monkey/trunk/seaspider/seasp2_convert
===================================================================
--- monkey/trunk/seaspider/seasp2_convert       2013-01-28 15:03:58 UTC (rev 
25927)
+++ monkey/trunk/seaspider/seasp2_convert       2013-01-28 16:53:44 UTC (rev 
25928)
@@ -26,17 +26,17 @@
             if not m or m.lastindex < 3:
                 print 'unknown ignore pattern on line %s: %s' % (lineno, line)
                 continue
-            ign_file = m.group(1)
-            ign_func = m.group(2)
-            ign_pattern = m.group(3)
-            ignlist.append((ign_file, ign_func, ign_pattern))
+#            ign_file = m.group(1)
+#            ign_func = m.group(2)
+#            ign_pattern = m.group(3)
+#            ignlist.append((ign_file, ign_func, ign_pattern))
             ignexp.append((re.compile(m.group(1)),
                            re.compile(m.group(2)),
                            re.compile(m.group(3))))
 
         lines = ignfile.readlines(100)
     ignfile.close()
-    return ignlist
+    return ignexp
 
 # argparse Action for a readable dir
 class readable_dir(argparse.Action):
@@ -112,10 +112,9 @@
 def add_expr(cur, ignores, func_name,
              file_name, expr_syntax, start_lineno, end_lineno, is_call):
     for i in ignores:
-        if (func_name and
-            i[0] in file_name and
-            i[1] in func_name and
-            i[2] in expr_syntax):
+        if (i[0].search(file_name) and
+            i[1].search(func_name) and
+            i[2].search(expr_syntax)):
             return
     vals = (file_name, expr_syntax, start_lineno, end_lineno, is_call)
     cur.execute('INSERT OR IGNORE INTO Expression VALUES (NULL,?,?,?,?,?)', 
vals)
@@ -129,7 +128,7 @@
     expr_list = []
     prevtype = ""
     seafile_lineno = 0
-    func_name = (32767, None)
+    func_name = (32767, '')
 
     try:
         infile = open(filename, 'r')
@@ -165,8 +164,8 @@
 
             if rowtype == 'SystemGlobal':
                 globalvar = m.group(4)
-                vals = (cfilename, globalvar, 0, 32767, 0)
-                sql_cur.execute('INSERT OR IGNORE INTO Expression VALUES 
(NULL,?,?,?,?,?)', vals)
+                add_expr(sql_cur, local_ignores, func_name[1],
+                         cfilename, globalvar, 0, 32767, 0)
             elif rowtype == 'Global':
                 lineno = int(m.group(3))
                 globalvar = m.group(4)
@@ -199,7 +198,7 @@
                 if lineno > scope_end[-1]:
                     scope_end.pop()
                     if lineno > func_name[0]:
-                        func_name = (32767, None)
+                        func_name = (32767, '')
                 del expr_list[:]
                 tmp = (m.group(4)[1:]).strip()
                 if len(tmp) > 0: expr_list.append(tmp)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]