diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2003-07-07 16:08:47 +0000 |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2003-07-07 16:08:47 +0000 |
commit | 89ec06ff8a83dbe96fca6e63a9120af097a9f21c (patch) | |
tree | 215cd6eb36d114215e96c0a465bd816758d7ebfa /Lib/trace.py | |
parent | 99ee63e7314ef16c0f81ea9b52a732452d30dd1d (diff) | |
download | cpython-89ec06ff8a83dbe96fca6e63a9120af097a9f21c.tar.gz |
Patch from Zooko to remove an experimental feature.
Diffstat (limited to 'Lib/trace.py')
-rw-r--r-- | Lib/trace.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Lib/trace.py b/Lib/trace.py index 3865527772..d896c6e7cf 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -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 - self.update(self.__class__(counts, calledfuncs)) - except (IOError, EOFError), err: + counts, calledfuncs = pickle.load(open(self.infile, 'r')) + self.update(self.__class__(counts, calledfuncs)) + except (IOError, EOFError, ValueError), err: print >> sys.stderr, ("Skipping counts file %r: %s" % (self.infile, err)) except pickle.UnpicklingError: |