Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18639/Pythonwin/pywin/tools
Modified Files:
hierlist.py
Log Message:
various syntax modernizations
Index: hierlist.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/hierlist.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** hierlist.py 14 Nov 2008 00:22:25 -0000 1.9
--- hierlist.py 26 Nov 2008 08:39:33 -0000 1.10
***************
*** 57,63 ****
self.bitmapMask = bitmapMask
def __getattr__(self, attr):
! l = self.__dict__['listControl']
! if l is not None:
! return getattr(l, attr)
def ItemFromHandle(self, handle):
return self.itemHandleMap[handle]
--- 57,65 ----
self.bitmapMask = bitmapMask
def __getattr__(self, attr):
! try:
! return getattr(self.listControl, attr)
! except AttributeError:
! return getattr(self, attr)
!
def ItemFromHandle(self, handle):
return self.itemHandleMap[handle]
|