From: Skip Montanaro Date: Sun, 11 Feb 2007 18:24:37 +0000 (+0000) Subject: fix trace.py --ignore-dir X-Git-Tag: v2.6a1~2189 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=691acf287900669c2540ab9664abcd266c2a6838;p=thirdparty%2FPython%2Fcpython.git fix trace.py --ignore-dir --- diff --git a/Lib/trace.py b/Lib/trace.py index 35edac2eead7..364e3f7bc99a 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -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 diff --git a/Misc/NEWS b/Misc/NEWS index aab07582b458..c42ade8e9c7f 100644 --- 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.