summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/signal_dispatcher.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ranger/ext/signal_dispatcher.py b/ranger/ext/signal_dispatcher.py
index c1630c0c..3f407bff 100644
--- a/ranger/ext/signal_dispatcher.py
+++ b/ranger/ext/signal_dispatcher.py
@@ -76,12 +76,11 @@ class SignalDispatcher(object):
 
 	def signal_emit(self, signal_name, **kw):
 		assert isinstance(signal_name, str)
-		try:
-			handlers = self._signals[signal_name]
-		except:
-			return
+		if signal_name not in self._signals:
+			return True
+		handlers = self._signals[signal_name]
 		if not handlers:
-			return
+			return True
 
 		signal = Signal(origin=self, name=signal_name, **kw)
 
@@ -98,6 +97,7 @@ class SignalDispatcher(object):
 					else:
 						fnc()
 					if signal.stopped:
-						return
+						return False
 				except ReferenceError:
 					handlers.remove(handler)
+		return True
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142