[pywin32-checkins] pywin32/com/win32com/client tlbrowse.py, 1.4, 1.5 util.py, 1.3, 1.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-10-01 14:45:05
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/com/win32com/client Modified Files: tlbrowse.py util.py Log Message: Move to 'new style' exception raising. Index: util.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/util.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** util.py 24 May 2007 13:00:03 -0000 1.3 --- util.py 1 Oct 2008 14:44:53 -0000 1.4 *************** *** 40,44 **** def __GetIndex(self, index): ! if type(index)!=type(0): raise TypeError, "Only integer indexes are supported for enumerators" # NOTE # In this context, self.index is users purely as a flag to say --- 40,44 ---- def __GetIndex(self, index): ! if type(index)!=type(0): raise TypeError("Only integer indexes are supported for enumerators") # NOTE # In this context, self.index is users purely as a flag to say *************** *** 54,58 **** if len(result): return self._make_retval_(result[0]) ! raise IndexError, "list index out of range" def Next(self, count=1): ret = self._oleobj_.Next(count) --- 54,58 ---- if len(result): return self._make_retval_(result[0]) ! raise IndexError("list index out of range") def Next(self, count=1): ret = self._oleobj_.Next(count) Index: tlbrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/tlbrowse.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tlbrowse.py 27 Oct 2002 10:15:48 -0000 1.4 --- tlbrowse.py 1 Oct 2008 14:44:53 -0000 1.5 *************** *** 7,11 **** from pywin.mfc import dialog ! error = "TypeLib browser internal error" FRAMEDLG_STD = win32con.WS_CAPTION | win32con.WS_SYSMENU --- 7,13 ---- from pywin.mfc import dialog ! class TLBrowserException(Exception): ! "TypeLib browser internal error" ! error = TLBrowserException FRAMEDLG_STD = win32con.WS_CAPTION | win32con.WS_SYSMENU *************** *** 193,197 **** return pos, 0 else: ! raise error, "The position is not valid" def CmdMemberListbox(self, id, code): --- 195,199 ---- return pos, 0 else: ! raise error("The position is not valid") def CmdMemberListbox(self, id, code): |