Update of /cvsroot/pywin32/pywin32/com/win32com/client
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10471/com/win32com/client
Modified Files:
__init__.py build.py dynamic.py
Log Message:
Move to exception attributes.
Index: dynamic.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/dynamic.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** dynamic.py 26 Aug 2007 03:42:13 -0000 1.22
--- dynamic.py 3 Oct 2008 01:03:56 -0000 1.23
***************
*** 187,191 ****
return str(self.__call__())
except pythoncom.com_error, details:
! if details[0] not in ERRORS_BAD_CONTEXT:
raise
return self.__repr__()
--- 187,191 ----
return str(self.__call__())
except pythoncom.com_error, details:
! if details.hresult not in ERRORS_BAD_CONTEXT:
raise
return self.__repr__()
***************
*** 489,493 ****
ret = self._oleobj_.Invoke(retEntry.dispid,0,invoke_type,1)
except pythoncom.com_error, details:
! if details[0] in ERRORS_BAD_CONTEXT:
# May be a method.
self._olerepr_.mapFuncs[attr] = retEntry
--- 489,493 ----
ret = self._oleobj_.Invoke(retEntry.dispid,0,invoke_type,1)
except pythoncom.com_error, details:
! if details.hresult in ERRORS_BAD_CONTEXT:
# May be a method.
self._olerepr_.mapFuncs[attr] = retEntry
Index: __init__.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/__init__.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** __init__.py 24 May 2005 14:30:04 -0000 1.34
--- __init__.py 3 Oct 2008 01:03:56 -0000 1.35
***************
*** 421,425 ****
# Eg, Lotus notes.
# So just let it use the existing object if E_NOINTERFACE
! if details[0] != winerror.E_NOINTERFACE:
raise
oobj = oobj._oleobj_
--- 421,425 ----
# Eg, Lotus notes.
# So just let it use the existing object if E_NOINTERFACE
! if details.hresult != winerror.E_NOINTERFACE:
raise
oobj = oobj._oleobj_
Index: build.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/build.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** build.py 29 Jun 2008 23:57:20 -0000 1.31
--- build.py 3 Oct 2008 01:03:56 -0000 1.32
***************
*** 454,459 ****
resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr)
except pythoncom.com_error, details:
! if details[0] in [winerror.TYPE_E_CANTLOADLIBRARY,
! winerror.TYPE_E_LIBNOTREGISTERED]:
# an unregistered interface
return pythoncom.VT_UNKNOWN, None, None
--- 454,458 ----
resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr)
except pythoncom.com_error, details:
! if details.hresult in [winerror.TYPE_E_CANTLOADLIBRARY, winerror.TYPE_E_LIBNOTREGISTERED]:
# an unregistered interface
return pythoncom.VT_UNKNOWN, None, None
|