(Python): Use more modern `raise' syntax.
[tripe] / peerdb / tripe-newpeers.in
index a40d438..f123255 100644 (file)
 ###
 ### This file is part of Trivial IP Encryption (TrIPE).
 ###
-### TrIPE is free software; you can redistribute it and/or modify
-### it under the terms of the GNU General Public License as published by
-### the Free Software Foundation; either version 2 of the License, or
-### (at your option) any later version.
+### TrIPE is free software: you can redistribute it and/or modify it under
+### the terms of the GNU General Public License as published by the Free
+### Software Foundation; either version 3 of the License, or (at your
+### option) any later version.
 ###
-### TrIPE is distributed in the hope that it will be useful,
-### but WITHOUT ANY WARRANTY; without even the implied warranty of
-### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-### GNU General Public License for more details.
+### TrIPE is distributed in the hope that it will be useful, but WITHOUT
+### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+### FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+### for more details.
 ###
 ### You should have received a copy of the GNU General Public License
-### along with TrIPE; if not, write to the Free Software Foundation,
-### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+### along with TrIPE.  If not, see <https://www.gnu.org/licenses/>.
 
 VERSION = '@VERSION@'
 
@@ -93,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):
@@ -237,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:
@@ -273,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()
@@ -292,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)