Patch from Zooko to remove an experimental feature.

This commit is contained in:
Jeremy Hylton 2003-07-07 16:08:47 +00:00
parent 7cb229df18
commit d7ce86dcab
1 changed files with 4 additions and 9 deletions

View File

@ -198,16 +198,11 @@ class CoverageResults:
self.infile = infile
self.outfile = outfile
if self.infile:
# Try and merge existing counts file.
# This code understand a couple of old trace.py formats.
# Try to merge existing counts file.
try:
thingie = pickle.load(open(self.infile, 'r'))
if isinstance(thingie, dict):
self.update(self.__class__(thingie))
elif isinstance(thingie, tuple) and len(thingie) == 2:
counts, calledfuncs = thingie
counts, calledfuncs = pickle.load(open(self.infile, 'r'))
self.update(self.__class__(counts, calledfuncs))
except (IOError, EOFError), err:
except (IOError, EOFError, ValueError), err:
print >> sys.stderr, ("Skipping counts file %r: %s"
% (self.infile, err))
except pickle.UnpicklingError: