summaryrefslogtreecommitdiff
path: root/Lib/trace.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/trace.py')
-rw-r--r--Lib/trace.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/trace.py b/Lib/trace.py
index 8a31d8ea21..8be4f24084 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