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

index 799c30280840bf527e9992360bcb02f1b6e415e4..967dfd04130d855b0977cc76ecfcdec6586d5513 100644 (file)
@@ -583,7 +583,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 8aa13bad0bc6f285e1e598e318396ad56874d817..280b6aa34936dbe21c784b1990660ba5998e4025 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -192,6 +192,9 @@ Extension Modules
 Library
 -------
 
+- Patch 1571379: Make trace's --ignore-dir facility work in the face of
+  relative directory names.
+
 - Bug #1545341: The 'classifier' keyword argument to the Distutils setup()
   function now accepts tuples as well as lists.