summaryrefslogtreecommitdiffstats
path: root/Lib/trace.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2003-07-07 16:08:47 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2003-07-07 16:08:47 (GMT)
commitd7ce86dcab78d3fef32bb8fff23e84cf9df628db (patch)
tree2f985ad00f706b694e7597e6df72463a4938fb63 /Lib/trace.py
parent7cb229df180ec3cefe9e52134d7c6ecbb9b4bc29 (diff)
downloadcpython-d7ce86dcab78d3fef32bb8fff23e84cf9df628db.zip
cpython-d7ce86dcab78d3fef32bb8fff23e84cf9df628db.tar.gz
cpython-d7ce86dcab78d3fef32bb8fff23e84cf9df628db.tar.bz2
Patch from Zooko to remove an experimental feature.
Diffstat (limited to 'Lib/trace.py')
-rw-r--r--Lib/trace.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/Lib/trace.py b/Lib/trace.py
index 3865527..d896c6e 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: