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):
|