diff options
| author | Guido van Rossum <guido@python.org> | 2004-02-19 19:17:08 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2004-02-19 19:17:08 +0000 |
| commit | 4c4bb6b75e0fbe05b76c824d34f14a1b6b84e8bc (patch) | |
| tree | 48db670cd4a94651fa385a0778ad61a6c5a873ab /Lib/trace.py | |
| parent | 66bc72c4bb95aba49a9a4da176974083998e83c8 (diff) | |
| download | cpython-git-4c4bb6b75e0fbe05b76c824d34f14a1b6b84e8bc.tar.gz | |
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. Backport of 1.18.
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 7f412633cf..424905b5a1 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -184,7 +184,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 @@ -298,7 +300,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 |
