[pywin32-checkins] pywin32/com/win32comext/adsi __init__.py,1.1,1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-05-27 07:08:41
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5493 Modified Files: __init__.py Log Message: * Give the Dispatch wrapper better names for wrapped objects. * If an attribute with value None exists on the base object, let that past. Index: __init__.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** __init__.py 5 May 2000 00:42:00 -0000 1.1 --- __init__.py 27 May 2005 07:08:30 -0000 1.2 *************** *** 37,41 **** if hasattr(ob, "Invoke"): import win32com.client.dynamic ! return win32com.client.dynamic.Dispatch(ob, "ADSI_object", ADSIDispatch) return ob --- 37,42 ---- if hasattr(ob, "Invoke"): import win32com.client.dynamic ! name = "Dispatch wrapper around %r" % ob ! return win32com.client.dynamic.Dispatch(ob, name, ADSIDispatch) return ob *************** *** 80,87 **** def __getattr__(self, attr): ! ret = getattr(self._oleobj_, attr, None) ! if ret is None: ! ret = win32com.client.CDispatch.__getattr__(self, attr) ! return ret def QueryInterface(self, iid): ret = self._oleobj_.QueryInterface(iid) --- 81,89 ---- def __getattr__(self, attr): ! try: ! return getattr(self._oleobj_, attr) ! except AttributeError: ! return win32com.client.CDispatch.__getattr__(self, attr) ! def QueryInterface(self, iid): ret = self._oleobj_.QueryInterface(iid) |