right; (2) write_results_file() didn't return a tuple of two ints when
it couldn't create the file. Will backport.
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
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