[Python-checkins] python/dist/src/Lib asyncore.py,1.34,1.35

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Fri, 13 Sep 2002 07:09:28 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv21303

Modified Files:
	asyncore.py 
Log Message:
Fiddle with compact_traceback().

More whitespace cleanup.


Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** asyncore.py	12 Sep 2002 04:57:29 -0000	1.34
--- asyncore.py	13 Sep 2002 14:09:26 -0000	1.35
***************
*** 228,232 ****
          if map is None:
              map = socket_map
!         map [self._fileno] = self
  
      def del_channel(self, map=None):
--- 228,232 ----
          if map is None:
              map = socket_map
!         map[self._fileno] = self
  
      def del_channel(self, map=None):
***************
*** 236,240 ****
          if map.has_key(fd):
              #self.log_info('closing channel %d:%s' % (fd, self))
!             del map [fd]
  
      def create_socket(self, family, type):
--- 236,240 ----
          if map.has_key(fd):
              #self.log_info('closing channel %d:%s' % (fd, self))
!             del map[fd]
  
      def create_socket(self, family, type):
***************
*** 462,468 ****
  
  def compact_traceback():
!     t,v,tb = sys.exc_info()
      tbinfo = []
!     while 1:
          tbinfo.append((
              tb.tb_frame.f_code.co_filename,
--- 462,469 ----
  
  def compact_traceback():
!     t, v, tb = sys.exc_info()
      tbinfo = []
!     assert tb # Must have a traceback
!     while tb:
          tbinfo.append((
              tb.tb_frame.f_code.co_filename,
***************
*** 471,476 ****
              ))
          tb = tb.tb_next
-         if not tb:
-             break
  
      # just to be safe
--- 472,475 ----
***************
*** 478,482 ****
  
      file, function, line = tbinfo[-1]
!     info = '[' + '] ['.join(map(lambda x: '|'.join(x), tbinfo)) + ']'
      return (file, function, line), t, v, info
  
--- 477,481 ----
  
      file, function, line = tbinfo[-1]
!     info = ' '.join(['[%s|%s|%s]' % x for x in tbinfo])
      return (file, function, line), t, v, info