chiark / gitweb /
(Python): Use more modern `raise' syntax.
[tripe] / mon / tripemon.in
index 7f48bd29c2925d8cb84ea6f21065b6ce5641dd93..24709344da4ce205fe9496a263fca57569adbc95 100644 (file)
@@ -40,7 +40,7 @@ import re as RX
 from cStringIO import StringIO
 
 try:
-  if OS.getenv('TRIPEMON_FORCE_GI'): raise ImportError
+  if OS.getenv('TRIPEMON_FORCE_GI'): raise ImportError()
   import pygtk
   pygtk.require('2.0')
   import gtk as G
@@ -773,7 +773,7 @@ class ValidatingEntry (G.Entry):
     ValidationError.
     """
     if not me.validp:
-      raise ValidationError
+      raise ValidationError()
     return G.Entry.get_text(me)
 
 def numericvalidate(min = None, max = None):