From: Georg Brandl Date: Sun, 1 Aug 2010 14:38:17 +0000 (+0000) Subject: #4943: do not try to include drive letters (and colons) when looking for a probably... X-Git-Tag: v3.2a2~565 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=120d633871a950d82194f2507c5ccaea284c69d6;p=thirdparty%2FPython%2Fcpython.git #4943: do not try to include drive letters (and colons) when looking for a probably module name. --- diff --git a/Lib/trace.py b/Lib/trace.py index 236ea49dd9d9..493c4e83df02 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -192,11 +192,13 @@ def fullmodname(path): base = path[len(longest) + 1:] else: base = path + # the drive letter is never part of the module name + drive, base = os.path.splitdrive(base) base = base.replace(os.sep, ".") if os.altsep: base = base.replace(os.altsep, ".") filename, ext = os.path.splitext(base) - return filename + return filename.lstrip(".") class CoverageResults: def __init__(self, counts=None, calledfuncs=None, infile=None,