Update of /cvsroot/pywin32/pywin32/com/win32com/demos
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19471/win32com/demos
Modified Files:
connect.py excelRTDServer.py ietoolbar.py
Log Message:
modernize syntax: all remaining raise statements in com/* upgraded
Index: ietoolbar.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/ietoolbar.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ietoolbar.py 1 Oct 2008 09:40:26 -0000 1.2
--- ietoolbar.py 26 Nov 2008 08:52:32 -0000 1.3
***************
*** 76,80 ****
def __setattr__(self, attr, val):
if not attr.startswith("_") and not self.__dict__.has_key(attr):
! raise AttributeError, attr
self.__dict__[attr] = val
--- 76,80 ----
def __setattr__(self, attr, val):
if not attr.startswith("_") and not self.__dict__.has_key(attr):
! raise AttributeError(attr)
self.__dict__[attr] = val
Index: connect.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/connect.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** connect.py 26 Nov 2008 01:47:26 -0000 1.3
--- connect.py 26 Nov 2008 08:52:32 -0000 1.4
***************
*** 56,60 ****
server.DoIt(val)
if client.last_event_arg != val:
! raise RuntimeError, "Sent %r, but got back %r" % (val, client.last_event_arg)
if verbose:
print "Sent and received %r" % val
--- 56,60 ----
server.DoIt(val)
if client.last_event_arg != val:
! raise RuntimeError("Sent %r, but got back %r" % (val, client.last_event_arg))
if verbose:
print "Sent and received %r" % val
Index: excelRTDServer.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/excelRTDServer.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** excelRTDServer.py 13 Feb 2005 12:08:29 -0000 1.1
--- excelRTDServer.py 26 Nov 2008 08:52:32 -0000 1.2
***************
*** 224,228 ****
Will raise NotImplemented if not overridden.
"""
! raise NotImplemented, 'Subclass must implement'
# Overridable class events...
--- 224,228 ----
Will raise NotImplemented if not overridden.
"""
! raise NotImplemented('Subclass must implement')
# Overridable class events...
***************
*** 257,261 ****
Gives us a chance to check if our topic data needs to be
changed (eg. check a file, quiz a database, etc)."""
! raise NotImplemented, 'subclass must implement'
def Reset(self):
--- 257,261 ----
Gives us a chance to check if our topic data needs to be
changed (eg. check a file, quiz a database, etc)."""
! raise NotImplemented('subclass must implement')
def Reset(self):
***************
*** 368,372 ****
# topic value, but explosions like this should be able to get handled by
# the VBA-side "On Error" stuff.
! raise ValueError, "Invalid topic strings: %s" % str(TopicStrings)
#self.cmd = str(self.cmd)
--- 368,372 ----
# topic value, but explosions like this should be able to get handled by
# the VBA-side "On Error" stuff.
! raise ValueError("Invalid topic strings: %s" % str(TopicStrings))
#self.cmd = str(self.cmd)
|