[pywin32-checkins] pywin32/com/win32comext/adsi __init__.py, 1.2, 1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-11-26 08:52:39
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19471/win32comext/adsi Modified Files: __init__.py Log Message: modernize syntax: all remaining raise statements in com/* upgraded Index: __init__.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** __init__.py 27 May 2005 07:08:30 -0000 1.2 --- __init__.py 26 Nov 2008 08:52:32 -0000 1.3 *************** *** 53,60 **** return self.__GetIndex(index) def __GetIndex(self, index): ! if type(index)!=type(0): raise TypeError, "Only integer indexes are supported for enumerators" if index != self.index + 1: # Index requested out of sequence. ! raise ValueError, "You must index this object sequentially" self.index = index result = ADsEnumerateNext(self._oleobj_, 1) --- 53,60 ---- return self.__GetIndex(index) def __GetIndex(self, index): ! if type(index)!=type(0): raise TypeError("Only integer indexes are supported for enumerators") if index != self.index + 1: # Index requested out of sequence. ! raise ValueError("You must index this object sequentially") self.index = index result = ADsEnumerateNext(self._oleobj_, 1) *************** *** 64,68 **** self.index = -1 self._oleobj_ = ADsBuildEnumerator(self._cont_) # a PyIADsEnumVARIANT ! raise IndexError, "list index out of range" class ADSIDispatch(win32com.client.CDispatch): --- 64,68 ---- self.index = -1 self._oleobj_ = ADsBuildEnumerator(self._cont_) # a PyIADsEnumVARIANT ! raise IndexError("list index out of range") class ADSIDispatch(win32com.client.CDispatch): |