summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-10-10 23:02:01 (GMT)
committerGuido van Rossum <guido@python.org>2003-10-10 23:02:01 (GMT)
commitb427c00376e0737147af9265755af454cbdb92cc (patch)
treee76e84fe0192ad963375a5657acdcec0fc57b1a5 /Lib
parent13dbabe46e3b9f788873377b05a237c5bebfd8f9 (diff)
downloadcpython-b427c00376e0737147af9265755af454cbdb92cc.zip
cpython-b427c00376e0737147af9265755af454cbdb92cc.tar.gz
cpython-b427c00376e0737147af9265755af454cbdb92cc.tar.bz2
The fullmodname() function chopped off the first character if the
module existed in the current directory. Fix this. Backport candidate (I presume).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/trace.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/trace.py b/Lib/trace.py
index 0f27273..3da9cdd 100644
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -180,7 +180,11 @@ def fullmodname(path):
if len(dir) > len(longest):
longest = dir
- base = path[len(longest) + 1:].replace("/", ".")
+ if longest:
+ base = path[len(longest) + 1:]
+ else:
+ base = path
+ base = base.replace("/", ".")
filename, ext = os.path.splitext(base)
return filename
@@ -291,6 +295,9 @@ class CoverageResults:
def write_results_file(self, path, lines, lnotab, lines_hit):
"""Return a coverage results file in path."""
+ print "path =", `path`
+ if "/arse" in path:
+ import pdb; pdb.set_trace()
try:
outfile = open(path, "w")
except IOError, err: