Use hooke.command_by_name[...] in hooke.plugin.*.
[hooke.git] / hooke / plugin / flatfilt.py
index 44f0e1f8ed3f5e1806e66cf4592a3516de924a3d..27caf158dba9d3ff165b8f161ccf7fb37202256b 100644 (file)
@@ -222,8 +222,7 @@ class FlatFilterCommand (FilterCommand):
         params['curve'] = curve
         inq = Queue()
         outq = Queue()
-        filt_command = [c for c in hooke.commands
-                        if c.name=='flat filter peaks'][0]
+        filt_command = hooke.command_by_name['flat filter peaks']
         filt_command.run(hooke, inq, outq, **params)
         peaks = outq.get()
         if isinstance(peaks, UncaughtException) \