Patch from Zooko to remove an experimental feature.
This commit is contained in:
parent
7cb229df18
commit
d7ce86dcab
13
Lib/trace.py
13
Lib/trace.py
|
@ -198,16 +198,11 @@ class CoverageResults:
|
||||||
self.infile = infile
|
self.infile = infile
|
||||||
self.outfile = outfile
|
self.outfile = outfile
|
||||||
if self.infile:
|
if self.infile:
|
||||||
# Try and merge existing counts file.
|
# Try to merge existing counts file.
|
||||||
# This code understand a couple of old trace.py formats.
|
|
||||||
try:
|
try:
|
||||||
thingie = pickle.load(open(self.infile, 'r'))
|
counts, calledfuncs = pickle.load(open(self.infile, 'r'))
|
||||||
if isinstance(thingie, dict):
|
self.update(self.__class__(counts, calledfuncs))
|
||||||
self.update(self.__class__(thingie))
|
except (IOError, EOFError, ValueError), err:
|
||||||
elif isinstance(thingie, tuple) and len(thingie) == 2:
|
|
||||||
counts, calledfuncs = thingie
|
|
||||||
self.update(self.__class__(counts, calledfuncs))
|
|
||||||
except (IOError, EOFError), err:
|
|
||||||
print >> sys.stderr, ("Skipping counts file %r: %s"
|
print >> sys.stderr, ("Skipping counts file %r: %s"
|
||||||
% (self.infile, err))
|
% (self.infile, err))
|
||||||
except pickle.UnpicklingError:
|
except pickle.UnpicklingError:
|
||||||
|
|
Loading…
Reference in New Issue