diff options
author | Guido van Rossum <guido@python.org> | 2004-02-19 19:16:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2004-02-19 19:16:50 (GMT) |
commit | bbca8da3ca5191d68c4cd8777b8ba8632c0cff44 (patch) | |
tree | 1b9c3189c7ce099037135abc15d76e72a9cd0575 /Lib/trace.py | |
parent | fa6c6f8a73c8da8242c2b4bfb5358733a5f1ef92 (diff) | |
download | cpython-bbca8da3ca5191d68c4cd8777b8ba8632c0cff44.zip cpython-bbca8da3ca5191d68c4cd8777b8ba8632c0cff44.tar.gz cpython-bbca8da3ca5191d68c4cd8777b8ba8632c0cff44.tar.bz2 |
Fix two small bugs: (1) on Windows, pathname munging didn't work
right; (2) write_results_file() didn't return a tuple of two ints when
it couldn't create the file. Will backport.
Diffstat (limited to 'Lib/trace.py')
-rw-r--r-- | Lib/trace.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/trace.py b/Lib/trace.py index 8a31d8e..8be4f24 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -183,7 +183,9 @@ def fullmodname(path): base = path[len(longest) + 1:] else: base = path - base = base.replace("/", ".") + base = base.replace(os.sep, ".") + if os.altsep: + base = base.replace(os.altsep, ".") filename, ext = os.path.splitext(base) return filename @@ -297,7 +299,7 @@ class CoverageResults: except IOError, err: print >> sys.stderr, ("trace: Could not open %r for writing: %s" "- skipping" % (path, err)) - return + return 0, 0 n_lines = 0 n_hits = 0 |