[Zodb-checkins] SVN: ZODB/trunk/src/ Massive style cleanup: Move to new raise exception style; for motivation, see:

Martijn Pieters mj at zopatista.com
Wed Aug 31 16:43:55 EDT 2005


Log message for revision 38214:
  Massive style cleanup: Move to new raise exception style; for motivation, see:
      
    http://permalink.gmane.org/gmane.comp.web.zope.zope3/13884
  
  

Changed:
  U   ZODB/trunk/src/ZEO/ClientStorage.py
  U   ZODB/trunk/src/ZEO/StorageServer.py
  U   ZODB/trunk/src/ZEO/auth/__init__.py
  U   ZODB/trunk/src/ZEO/auth/auth_digest.py
  U   ZODB/trunk/src/ZEO/auth/base.py
  U   ZODB/trunk/src/ZEO/auth/hmac.py
  U   ZODB/trunk/src/ZEO/tests/testZEO.py
  U   ZODB/trunk/src/ZEO/zeopasswd.py
  U   ZODB/trunk/src/ZEO/zrpc/_hmac.py
  U   ZODB/trunk/src/ZEO/zrpc/client.py
  U   ZODB/trunk/src/ZODB/BaseStorage.py
  U   ZODB/trunk/src/ZODB/ConflictResolution.py
  U   ZODB/trunk/src/ZODB/DemoStorage.py
  U   ZODB/trunk/src/ZODB/FileStorage/FileStorage.py
  U   ZODB/trunk/src/ZODB/Mount.py
  U   ZODB/trunk/src/ZODB/persistentclass.py
  U   ZODB/trunk/src/ZODB/tests/ConflictResolution.py
  U   ZODB/trunk/src/ZODB/tests/StorageTestBase.py
  U   ZODB/trunk/src/ZODB/tests/testRecover.py
  U   ZODB/trunk/src/ZODB/tests/testSerialize.py
  U   ZODB/trunk/src/ZODB/tests/test_storage.py
  U   ZODB/trunk/src/ZODB/transact.py
  U   ZODB/trunk/src/persistent/tests/test_overriding_attrs.py
  U   ZODB/trunk/src/scripts/fsoids.py
  U   ZODB/trunk/src/scripts/fstest.py
  U   ZODB/trunk/src/scripts/mkzeoinst.py
  U   ZODB/trunk/src/scripts/zeopack.py

-=-
Modified: ZODB/trunk/src/ZEO/ClientStorage.py
===================================================================
--- ZODB/trunk/src/ZEO/ClientStorage.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/ClientStorage.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -417,7 +417,7 @@
 
     def doAuth(self, protocol, stub):
         if not (self._username and self._password):
-            raise AuthError, "empty username or password"
+            raise AuthError("empty username or password")
 
         module = get_module(protocol)
         if not module:
@@ -430,7 +430,7 @@
         if not client:
             log2("%s: %s isn't a valid protocol, must have a Client class" %
                  (self.__class__.__name__, protocol), level=logging.WARNING)
-            raise AuthError, "invalid protocol"
+            raise AuthError("invalid protocol")
 
         c = client(stub)
 
@@ -472,7 +472,7 @@
                 conn.setSessionKey(skey)
             else:
                 log2("Authentication failed")
-                raise AuthError, "Authentication failed"
+                raise AuthError("Authentication failed")
 
         try:
             stub.register(str(self._storage), self._is_read_only)

Modified: ZODB/trunk/src/ZEO/StorageServer.py
===================================================================
--- ZODB/trunk/src/ZEO/StorageServer.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/StorageServer.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -206,15 +206,15 @@
         immediately after authentication is finished.
         """
         if self.auth_realm and not self.authenticated:
-            raise AuthError, "Client was never authenticated with server!"
+            raise AuthError("Client was never authenticated with server!")
 
         if self.storage is not None:
             self.log("duplicate register() call")
-            raise ValueError, "duplicate register() call"
+            raise ValueError("duplicate register() call")
         storage = self.server.storages.get(storage_id)
         if storage is None:
             self.log("unknown storage_id: %s" % storage_id)
-            raise ValueError, "unknown storage: %s" % storage_id
+            raise ValueError("unknown storage: %s" % storage_id)
 
         if not read_only and (self.read_only or storage.isReadOnly()):
             raise ReadOnlyError()

Modified: ZODB/trunk/src/ZEO/auth/__init__.py
===================================================================
--- ZODB/trunk/src/ZEO/auth/__init__.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/auth/__init__.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -26,5 +26,5 @@
 
 def register_module(name, storage_class, client, db):
     if _auth_modules.has_key(name):
-        raise TypeError, "%s is already registred" % name
+        raise TypeError("%s is already registred" % name)
     _auth_modules[name] = storage_class, client, db

Modified: ZODB/trunk/src/ZEO/auth/auth_digest.py
===================================================================
--- ZODB/trunk/src/ZEO/auth/auth_digest.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/auth/auth_digest.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -112,7 +112,7 @@
         # we sent to the client.  It will need to generate a new
         # nonce for a new connection anyway.
         if self._challenge != challenge:
-            raise ValueError, "invalid challenge"
+            raise ValueError("invalid challenge")
 
         # lookup user in database
         h_up = self.database.get_password(user)

Modified: ZODB/trunk/src/ZEO/auth/base.py
===================================================================
--- ZODB/trunk/src/ZEO/auth/base.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/auth/base.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -62,8 +62,8 @@
         self.load()
         if realm:
             if self.realm and self.realm != realm:
-                raise ValueError, ("Specified realm %r differs from database "
-                                   "realm %r" % (realm or '', self.realm))
+                raise ValueError("Specified realm %r differs from database "
+                                 "realm %r" % (realm or '', self.realm))
             else:
                 self.realm = realm
 
@@ -109,7 +109,7 @@
         Callers must check for LookupError, which is raised in
         the case of a non-existent user specified."""
         if not self._users.has_key(username):
-            raise LookupError, "No such user: %s" % username
+            raise LookupError("No such user: %s" % username)
         return self._users[username]
 
     def hash(self, s):
@@ -117,15 +117,15 @@
 
     def add_user(self, username, password):
         if self._users.has_key(username):
-            raise LookupError, "User %s already exists" % username
+            raise LookupError("User %s already exists" % username)
         self._store_password(username, password)
 
     def del_user(self, username):
         if not self._users.has_key(username):
-            raise LookupError, "No such user: %s" % username
+            raise LookupError("No such user: %s" % username)
         del self._users[username]
 
     def change_password(self, username, password):
         if not self._users.has_key(username):
-            raise LookupError, "No such user: %s" % username
+            raise LookupError("No such user: %s" % username)
         self._store_password(username, password)

Modified: ZODB/trunk/src/ZEO/auth/hmac.py
===================================================================
--- ZODB/trunk/src/ZEO/auth/hmac.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/auth/hmac.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -48,7 +48,7 @@
             self.update(msg)
 
 ##    def clear(self):
-##        raise NotImplementedError, "clear() method not available in HMAC."
+##        raise NotImplementedError("clear() method not available in HMAC.")
 
     def update(self, msg):
         """Update this hashing object with the string msg.

Modified: ZODB/trunk/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/testZEO.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/tests/testZEO.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -98,7 +98,7 @@
                 return port
         finally:
             s.close()
-    raise RuntimeError, "Can't find port"
+    raise RuntimeError("Can't find port")
 
 class GenericTests(
     # Base class for all ZODB tests

Modified: ZODB/trunk/src/ZEO/zeopasswd.py
===================================================================
--- ZODB/trunk/src/ZEO/zeopasswd.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/zeopasswd.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -112,7 +112,7 @@
         # dbclass is used for testing tests.auth_plaintext, see testAuth.py
         Database = dbclass
     else:
-        raise ValueError, "Unknown database type %r" % p
+        raise ValueError("Unknown database type %r" % p)
     if auth_db is None:
         usage("Error: configuration does not specify auth database")
     db = Database(auth_db, auth_realm)

Modified: ZODB/trunk/src/ZEO/zrpc/_hmac.py
===================================================================
--- ZODB/trunk/src/ZEO/zrpc/_hmac.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/zrpc/_hmac.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -55,7 +55,7 @@
             self.update(msg)
 
 ##    def clear(self):
-##        raise NotImplementedError, "clear() method not available in HMAC."
+##        raise NotImplementedError("clear() method not available in HMAC.")
 
     def update(self, msg):
         """Update this hashing object with the string msg.

Modified: ZODB/trunk/src/ZEO/zrpc/client.py
===================================================================
--- ZODB/trunk/src/ZEO/zrpc/client.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZEO/zrpc/client.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -66,8 +66,7 @@
             for addr in addrs:
                 addr_type = self._guess_type(addr)
                 if addr_type is None:
-                    raise ValueError, (
-                        "unknown address in list: %s" % repr(addr))
+                    raise ValueError("unknown address in list: %s" % repr(addr))
                 addrlist.append((addr_type, addr))
             return addrlist
 

Modified: ZODB/trunk/src/ZODB/BaseStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/BaseStorage.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/BaseStorage.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -288,7 +288,7 @@
     def undo(self, transaction_id, txn):
         if self._is_read_only:
             raise POSException.ReadOnlyError()
-        raise POSException.UndoError, 'non-undoable transaction'
+        raise POSException.UndoError('non-undoable transaction')
 
     def undoLog(self, first, last, filter=None):
         return ()
@@ -313,7 +313,7 @@
             self._lock_release()
 
     def loadSerial(self, oid, serial):
-        raise POSException.Unsupported, (
+        raise POSException.Unsupported(
             "Retrieval of historical revisions is not supported")
 
     def loadBefore(self, oid, tid):

Modified: ZODB/trunk/src/ZODB/ConflictResolution.py
===================================================================
--- ZODB/trunk/src/ZODB/ConflictResolution.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/ConflictResolution.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -64,7 +64,7 @@
         return "PR(%s %s)" % (id(self), self.data)
 
     def __getstate__(self):
-        raise PicklingError, "Can't pickle PersistentReference"
+        raise PicklingError("Can't pickle PersistentReference")
 
 class PersistentReferenceFactory:
 

Modified: ZODB/trunk/src/ZODB/DemoStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/DemoStorage.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/DemoStorage.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -103,7 +103,7 @@
         self._ltid = None
         self._clear_temp()
         if base is not None and base.versions():
-            raise POSException.StorageError, (
+            raise POSException.StorageError(
                 "Demo base storage has version data")
 
     # While we officially don't support wrapping a non-read-only base
@@ -213,7 +213,7 @@
             except KeyError:
                 if self._base:
                     return self._base.load(oid, '')
-                raise KeyError, oid
+                raise KeyError(oid)
 
             ver = ""
             if vdata:
@@ -224,11 +224,11 @@
                         # data.
                         oid, pre, vdata, p, skiptid = nv
                     else:
-                        raise KeyError, oid
+                        raise KeyError(oid)
                 ver = oversion
 
             if p is None:
-                raise KeyError, oid
+                raise KeyError(oid)
 
             return p, tid, ver
         finally: self._lock_release()
@@ -269,7 +269,7 @@
 
                 if vdata:
                     if vdata[0] != version:
-                        raise POSException.VersionLockError, oid
+                        raise POSException.VersionLockError(oid)
 
                     nv=vdata[1]
                 else:
@@ -287,7 +287,7 @@
             if version: s=s+32+len(version)
 
             if self._quota is not None and s > self._quota:
-                raise POSException.StorageError, (
+                raise POSException.StorageError(
                     '''<b>Quota Exceeded</b><br>
                     The maximum quota for this demonstration storage
                     has been exceeded.<br>Have a nice day.''')

Modified: ZODB/trunk/src/ZODB/FileStorage/FileStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/FileStorage/FileStorage.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/FileStorage/FileStorage.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -1322,7 +1322,7 @@
             raise POSException.ReadOnlyError()
 
         stop=`TimeStamp(*time.gmtime(t)[:5]+(t%60,))`
-        if stop==z64: raise FileStorageError, 'Invalid pack time'
+        if stop==z64: raise FileStorageError('Invalid pack time')
 
         # If the storage is empty, there's nothing to do.
         if not self._index:
@@ -1331,7 +1331,7 @@
         self._lock_acquire()
         try:
             if self._pack_is_in_progress:
-                raise FileStorageError, 'Already packing'
+                raise FileStorageError('Already packing')
             self._pack_is_in_progress = True
             current_size = self.getSize()
         finally:
@@ -1624,10 +1624,10 @@
 
     if file_size:
         if file_size < start:
-            raise FileStorageFormatError, file.name
+            raise FileStorageFormatError(file.name)
         seek(0)
         if read(4) != packed_version:
-            raise FileStorageFormatError, name
+            raise FileStorageFormatError(name)
     else:
         if not read_only:
             file.write(packed_version)
@@ -1791,8 +1791,7 @@
     except:
         logger.error("couldn\'t write truncated data for %s", name,
               exc_info=True)
-        raise POSException.StorageSystemError, (
-            "Couldn't save truncated data")
+        raise POSException.StorageSystemError("Couldn't save truncated data")
 
     file.seek(pos)
     file.truncate()
@@ -1824,7 +1823,7 @@
             file = open(file, 'rb')
         self._file = file
         if file.read(4) != packed_version:
-            raise FileStorageFormatError, file.name
+            raise FileStorageFormatError(file.name)
         file.seek(0,2)
         self._file_size = file.tell()
         self._pos = 4L
@@ -1887,7 +1886,7 @@
         if self._file is None:
             # A closed iterator.  Is IOError the best we can do?  For
             # now, mimic a read on a closed file.
-            raise IOError, 'iterator is closed'
+            raise IOError('iterator is closed')
 
         pos = self._pos
         while 1:
@@ -1906,11 +1905,11 @@
             self._ltid = h.tid
 
             if self._stop is not None and h.tid > self._stop:
-                raise IndexError, index
+                raise IndexError(index)
 
             if h.status == "c":
                 # Assume we've hit the last, in-progress transaction
-                raise IndexError, index
+                raise IndexError(index)
 
             if pos + h.tlen + 8 > self._file_size:
                 # Hm, the data were truncated or the checkpoint flag wasn't
@@ -1974,7 +1973,7 @@
 
             return result
 
-        raise IndexError, index
+        raise IndexError(index)
 
 class RecordIterator(Iterator, BaseStorage.TransactionRecord,
                      FileStorageFormatter):
@@ -2023,7 +2022,7 @@
             r = Record(h.oid, h.tid, h.version, data, prev_txn, pos)
             return r
 
-        raise IndexError, index
+        raise IndexError(index)
 
 class Record(BaseStorage.DataRecord):
     """An abstract database record."""

Modified: ZODB/trunk/src/ZODB/Mount.py
===================================================================
--- ZODB/trunk/src/ZODB/Mount.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/Mount.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -215,12 +215,12 @@
         try:
             app = root['Application']
         except:
-            raise MountedStorageError, (
+            raise MountedStorageError(
                 "No 'Application' object exists in the mountable database.")
         try:
             return app.unrestrictedTraverse(self._path)
         except:
-            raise MountedStorageError, (
+            raise MountedStorageError(
                 "The path '%s' was not found in the mountable database."
                 % self._path)
 

Modified: ZODB/trunk/src/ZODB/persistentclass.py
===================================================================
--- ZODB/trunk/src/ZODB/persistentclass.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/persistentclass.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -54,14 +54,14 @@
             return self
 
         if '__global_persistent_class_not_stored_in_DB__' in inst.__dict__:
-            raise AttributeError, self.__name__
+            raise AttributeError(self.__name__)
         return inst._p_class_dict.get(self.__name__)
     
     def __set__(self, inst, v):
         inst._p_class_dict[self.__name__] = v
 
     def __delete__(self, inst):
-        raise AttributeError, self.__name__
+        raise AttributeError(self.__name__)
 
 class _p_oid_or_jar_Descr(_p_DataDescr):
     # Special descr for _p_oid and _p_jar that loads
@@ -112,10 +112,10 @@
         return self.func.__get__(inst, cls)
 
     def __set__(self, inst, v):
-        raise AttributeError, self.__name__
+        raise AttributeError(self.__name__)
 
     def __delete__(self, inst):
-        raise AttributeError, self.__name__
+        raise AttributeError(self.__name__)
     
 
 special_class_descrs = '__dict__', '__weakref__'

Modified: ZODB/trunk/src/ZODB/tests/ConflictResolution.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/ConflictResolution.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/tests/ConflictResolution.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -47,11 +47,11 @@
 
 class PCounter3(PCounter):
     def _p_resolveConflict(self, oldState, savedState, newState):
-        raise AttributeError, "no attribute (testing conflict resolution)"
+        raise AttributeError("no attribute (testing conflict resolution)")
 
 class PCounter4(PCounter):
     def _p_resolveConflict(self, oldState, savedState):
-        raise RuntimeError, "Can't get here; not enough args"
+        raise RuntimeError("Can't get here; not enough args")
 
 class ConflictResolvingStorage:
 

Modified: ZODB/trunk/src/ZODB/tests/StorageTestBase.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/StorageTestBase.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/tests/StorageTestBase.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -99,7 +99,7 @@
                 print >> sys.stderr, "can't find %s in %r" % (klassname, ns)
         inst = klass()
     else:
-        raise ValueError, "expected class info: %s" % repr(klass_info)
+        raise ValueError("expected class info: %s" % repr(klass_info))
     state = u.load()
     inst.__setstate__(state)
     return inst

Modified: ZODB/trunk/src/ZODB/tests/testRecover.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testRecover.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/tests/testRecover.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -86,7 +86,7 @@
                 ZODB.fsrecover.recover(self.path, self.dest,
                         verbose=0, partial=True, force=False, pack=1)
             except SystemExit:
-                raise RuntimeError, "recover tried to exit"
+                raise RuntimeError("recover tried to exit")
         finally:
             sys.stdout = orig_stdout
         return faux_stdout.getvalue()

Modified: ZODB/trunk/src/ZODB/tests/testSerialize.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testSerialize.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/tests/testSerialize.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -102,7 +102,7 @@
                 if name == "error":
                     raise ValueError("whee!")
                 else:
-                    raise AttributeError, name
+                    raise AttributeError(name)
 
         class NewStyle(object):
             bar = "bar"

Modified: ZODB/trunk/src/ZODB/tests/test_storage.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/test_storage.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/tests/test_storage.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -123,7 +123,7 @@
         try:
             tids = [tid for oid, tid in self._index if oid == the_oid]
             if not tids:
-                raise KeyError, the_oid
+                raise KeyError(the_oid)
             tids.sort()
             i = bisect.bisect_left(tids, the_tid) - 1
             if i == -1:

Modified: ZODB/trunk/src/ZODB/transact.py
===================================================================
--- ZODB/trunk/src/ZODB/transact.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/ZODB/transact.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -54,5 +54,5 @@
                     raise
                 continue
             return r
-        raise RuntimeError, "couldn't commit transaction"
+        raise RuntimeError("couldn't commit transaction")
     return g

Modified: ZODB/trunk/src/persistent/tests/test_overriding_attrs.py
===================================================================
--- ZODB/trunk/src/persistent/tests/test_overriding_attrs.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/persistent/tests/test_overriding_attrs.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -73,7 +73,7 @@
         """
         # Don't pretend we have any special attributes.
         if name.startswith("__") and name.endswrith("__"):
-            raise AttributeError, name
+            raise AttributeError(name)
         else:
             return name.upper(), self._p_changed
 
@@ -178,7 +178,7 @@
         # Maybe it's a method:
         meth = getattr(self.__class__, name, None)
         if meth is None:
-            raise AttributeError, name
+            raise AttributeError(name)
 
         return meth.__get__(self, self.__class__)
 

Modified: ZODB/trunk/src/scripts/fsoids.py
===================================================================
--- ZODB/trunk/src/scripts/fsoids.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/scripts/fsoids.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -52,7 +52,7 @@
         opts, args = getopt.getopt(sys.argv[1:], 'f:')
         if not args:
             usage()
-            raise ValueError, "Must specify a FileStorage"
+            raise ValueError("Must specify a FileStorage")
         path = None
         for k, v in opts:
             if k == '-f':

Modified: ZODB/trunk/src/scripts/fstest.py
===================================================================
--- ZODB/trunk/src/scripts/fstest.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/scripts/fstest.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -209,7 +209,7 @@
     try:
         opts, args = getopt.getopt(sys.argv[1:], 'v')
         if len(args) != 1:
-            raise ValueError, "expected one argument"
+            raise ValueError("expected one argument")
         for k, v in opts:
             if k == '-v':
                 VERBOSE = VERBOSE + 1

Modified: ZODB/trunk/src/scripts/mkzeoinst.py
===================================================================
--- ZODB/trunk/src/scripts/mkzeoinst.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/scripts/mkzeoinst.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -197,7 +197,7 @@
             if not os.path.isabs(path):
                 path = os.path.abspath(path)
             return path
-    raise IOError, "can't find %r on path %r" % (program, strpath)
+    raise IOError("can't find %r on path %r" % (program, strpath))
 
 def makedir(*args):
     path = ""

Modified: ZODB/trunk/src/scripts/zeopack.py
===================================================================
--- ZODB/trunk/src/scripts/zeopack.py	2005-08-31 20:24:34 UTC (rev 38213)
+++ ZODB/trunk/src/scripts/zeopack.py	2005-08-31 20:43:54 UTC (rev 38214)
@@ -45,7 +45,7 @@
         storage._call.connect()
         if storage._connected:
             return
-    raise RuntimeError, "Unable to connect to ZEO server"
+    raise RuntimeError("Unable to connect to ZEO server")
 
 def pack1(addr, storage, days, wait):
     cs = ClientStorage(addr, storage=storage,



More information about the Zodb-checkins mailing list