support for OP_RETURN
[electrum-nvc.git] / lib / plugins.py
index 0e7e520..700dbc2 100644 (file)
@@ -24,7 +24,7 @@ def init_plugins(self):
     for name, p in zip(plugin_names, plugin_modules):
         try:
             plugins.append( p.Plugin(self, name) )
-        except:
+        except Exception:
             print_msg(_("Error: cannot initialize plugin"),p)
             traceback.print_exc(file=sys.stdout)
 
@@ -34,6 +34,8 @@ def run_hook(name, *args):
     
     global plugins
 
+    found = 0
+
     for p in plugins:
 
         if not p.is_enabled():
@@ -43,13 +45,15 @@ def run_hook(name, *args):
         if not callable(f):
             continue
 
+        found += 1
+
         try:
             f(*args)
-        except:
+        except Exception:
             print_error("Plugin error")
             traceback.print_exc(file=sys.stdout)
             
-    return
+    return found