chiark / gitweb /
(Python): Use more modern `raise' syntax.
[tripe] / peerdb / tripe-newpeers.in
index 700e69d7826e335b468c5d2236757bf06e9f46e3..f123255192db78ca8c41ba59502abeb10cac5a2c 100644 (file)
@@ -92,7 +92,7 @@ class BulkResolver (object):
     """
     addr = me._namemap[host]
     if addr is None:
-      raise KeyError, host
+      raise KeyError(host)
     return addr
 
   def _resolved(me, host, addr):
@@ -236,7 +236,7 @@ class MyConfigParser (CP.RawConfigParser):
       pass
     else:
       if threadp:
-        raise InheritanceCycleError(key, path)
+        raise InheritanceCycleError(key, path)
 
     ## See whether the answer is ready waiting for us.
     try:
@@ -272,7 +272,7 @@ class MyConfigParser (CP.RawConfigParser):
         value = v
         winner = pp
       elif value != v:
-        raise AmbiguousOptionError(key, winner, value, pp, v)
+        raise AmbiguousOptionError(key, winner, value, pp, v)
 
     ## That's the best we could manage.
     path.pop()
@@ -291,7 +291,7 @@ class MyConfigParser (CP.RawConfigParser):
     else:
       value, _ = me._get(sec, key)
       if value is None:
-        raise MissingKeyException(sec, key)
+        raise MissingKeyException(sec, key)
 
     ## Expand the value and return it.
     return me._expand(sec, value, resolvep)