]> granicus.if.org Git - python/commitdiff
Fix #1693149. Now you can pass several modules separated by
authorFacundo Batista <facundobatista@gmail.com>
Sat, 19 Jan 2008 18:38:19 +0000 (18:38 +0000)
committerFacundo Batista <facundobatista@gmail.com>
Sat, 19 Jan 2008 18:38:19 +0000 (18:38 +0000)
coma to trace.py in the same --ignore-module option.
Thanks Raghuram Devarakonda.

Doc/library/trace.rst
Lib/trace.py

index 91cf1a46c5e8fc8e8afd8ffaed7efee231572661..9d0c0c4d1a3bc90e0e63716aeb6979f05b0900c1 100644 (file)
@@ -64,12 +64,14 @@ The following command-line arguments are supported:
    stdout for each file processed.
 
 :option:`--ignore-module`
-   Ignore the named module and its submodules (if it is a package).  May be given
+   Accepts comma separated list of module names. Ignore each of the named
+   module and its submodules (if it is a package).  May be given 
    multiple times.
 
 :option:`--ignore-dir`
-   Ignore all modules and packages in the named directory and subdirectories.  May
-   be given multiple times.
+   Ignore all modules and packages in the named directory and subdirectories
+   (multiple directories can be joined by os.pathsep).  May be given multiple
+   times. 
 
 
 .. _trace-api:
index 3f006052544b43b25f862e8e3c5313400f341067..2e403c8b3eb523c33855018824a84f42209f1e14 100644 (file)
@@ -100,8 +100,9 @@ Modifiers:
                       (Can only be used with --count or --report.)
 
 Filters, may be repeated multiple times:
---ignore-module=<mod> Ignore the given module and its submodules
-                      (if it is a package).
+--ignore-module=<mod> Ignore the given module(s) and its submodules
+                      (if it is a package).  Accepts comma separated
+                      list of module names
 --ignore-dir=<dir>    Ignore files in the given directory (multiple
                       directories can be joined by os.pathsep).
 """ % sys.argv[0])
@@ -729,7 +730,8 @@ def main(argv=None):
             continue
 
         if opt == "--ignore-module":
-            ignore_modules.append(val)
+            for mod in val.split(","):
+                ignore_modules.append(mod.strip())
             continue
 
         if opt == "--ignore-dir":