summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xblather.py2
-rw-r--r--gtkui.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/blather.py b/blather.py
index 2a2c452..5406583 100755
--- a/blather.py
+++ b/blather.py
@@ -180,7 +180,7 @@ class Blather:
     def recognizer_finished(self, recognizer, text):
         t = text.lower()
         # Is there a matching command?
-        if self.commands.has_key( t ):
+        if t in self.commands:
             # Run the valid_sentence_command if there is a valid sentence command
             if self.options['valid_sentence_command']:
                 subprocess.call(self.options['valid_sentence_command'], shell=True)
diff --git a/gtkui.py b/gtkui.py
index 7c3600d..db5174a 100644
--- a/gtkui.py
+++ b/gtkui.py
@@ -13,7 +13,7 @@ class UI(GObject.GObject):
         'command' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (GObject.TYPE_STRING,))
     }
 
-    def __init__(self,args, continuous):
+    def __init__(self, args, continuous):
         GObject.GObject.__init__(self)
         self.continuous = continuous
         # Make a window
@@ -33,8 +33,8 @@ class UI(GObject.GObject):
         layout.add(self.ccheckbox)
 
         # Connect the buttons
-        self.lsbutton.connect("clicked",self.lsbutton_clicked)
-        self.ccheckbox.connect("clicked",self.ccheckbox_clicked)
+        self.lsbutton.connect("clicked", self.lsbutton_clicked)
+        self.ccheckbox.connect("clicked", self.ccheckbox_clicked)
 
         # Add a label to the UI to display the last command
         self.label = Gtk.Label()