]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix trace.py --ignore-dir
authorSkip Montanaro <skip@pobox.com>
Sun, 11 Feb 2007 18:24:37 +0000 (18:24 +0000)
committerSkip Montanaro <skip@pobox.com>
Sun, 11 Feb 2007 18:24:37 +0000 (18:24 +0000)
Lib/trace.py
Misc/NEWS

index 35edac2eead7a3c0dd0e7c07944b1c6d74f7d3e7..364e3f7bc99ab4951a540308e42418c7e60d2317 100644 (file)
@@ -587,7 +587,7 @@ class Trace:
         """
         if why == 'call':
             code = frame.f_code
-            filename = code.co_filename
+            filename = frame.f_globals.get('__file__', None)
             if filename:
                 # XXX modname() doesn't work right for packages, so
                 # the ignore support won't work right for packages
index aab07582b458f2922df42777958be41f4e6a2bca..c42ade8e9c7f17b17d4dd8b59f1a699100f56105 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -128,6 +128,9 @@ Core and builtins
 Library
 -------
 
+- Patch 1571379: Make trace's --ignore-dir facility work in the face of
+  relative directory names.
+
 - Bug #1600860: Search for shared python library in LIBDIR, not lib/python/config,
   on "linux" and "gnu" systems.