[Python-checkins] python/dist/src/Lib trace.py,1.10,1.11
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
Mon, 07 Jul 2003 09:08:49 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv19007
Modified Files:
trace.py
Log Message:
Patch from Zooko to remove an experimental feature.
Index: trace.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/trace.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** trace.py 27 Jun 2003 19:22:11 -0000 1.10
--- trace.py 7 Jul 2003 16:08:47 -0000 1.11
***************
*** 199,212 ****
self.outfile = outfile
if self.infile:
! # Try and merge existing counts file.
! # This code understand a couple of old trace.py formats.
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:
print >> sys.stderr, ("Skipping counts file %r: %s"
% (self.infile, err))
--- 199,207 ----
self.outfile = outfile
if self.infile:
! # Try to merge existing counts file.
try:
! 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))