Update of /cvsroot/pywin32/pywin32/com/win32com/client
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10646/com/win32com/client
Modified Files:
Tag: py3k
__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.2.2
retrieving revision 1.22.2.3
diff -C2 -d -r1.22.2.2 -r1.22.2.3
*** dynamic.py 31 Aug 2008 09:48:03 -0000 1.22.2.2
--- dynamic.py 3 Oct 2008 01:09:55 -0000 1.22.2.3
***************
*** 182,186 ****
return str(self.__call__())
except pythoncom.com_error as details:
! if details.args[0] not in ERRORS_BAD_CONTEXT:
raise
return self.__repr__()
--- 182,186 ----
return str(self.__call__())
except pythoncom.com_error as details:
! if details.hresult not in ERRORS_BAD_CONTEXT:
raise
return self.__repr__()
***************
*** 481,485 ****
ret = self._oleobj_.Invoke(retEntry.dispid,0,invoke_type,1)
except pythoncom.com_error as details:
! if details.args[0] in ERRORS_BAD_CONTEXT:
# May be a method.
self._olerepr_.mapFuncs[attr] = retEntry
--- 481,485 ----
ret = self._oleobj_.Invoke(retEntry.dispid,0,invoke_type,1)
except pythoncom.com_error as 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.4.2
retrieving revision 1.34.4.3
diff -C2 -d -r1.34.4.2 -r1.34.4.3
*** __init__.py 31 Aug 2008 09:00:21 -0000 1.34.4.2
--- __init__.py 3 Oct 2008 01:09:55 -0000 1.34.4.3
***************
*** 421,425 ****
# Eg, Lotus notes.
# So just let it use the existing object if E_NOINTERFACE
! if details.args[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.2.2
retrieving revision 1.31.2.3
diff -C2 -d -r1.31.2.2 -r1.31.2.3
*** build.py 31 Aug 2008 09:33:17 -0000 1.31.2.2
--- build.py 3 Oct 2008 01:09:55 -0000 1.31.2.3
***************
*** 456,460 ****
resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr)
except pythoncom.com_error as details:
! if details.args[0] in [winerror.TYPE_E_CANTLOADLIBRARY, winerror.TYPE_E_LIBNOTREGISTERED]:
# an unregistered interface
return pythoncom.VT_UNKNOWN, None, None
--- 456,460 ----
resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr)
except pythoncom.com_error as details:
! if details.hresult in [winerror.TYPE_E_CANTLOADLIBRARY, winerror.TYPE_E_LIBNOTREGISTERED]:
# an unregistered interface
return pythoncom.VT_UNKNOWN, None, None
|