bt2: make Graph add listener methods return None
[babeltrace.git] / src / bindings / python / bt2 / bt2 / graph.py
index ef40014ba9262e58e678193e2b9355c59a92de27..79be1ca80905a94c8aab0de01044c96b41bf287f 100644 (file)
@@ -166,8 +166,6 @@ class Graph(object._SharedObject):
         if listener_ids is None:
             raise bt2._Error('cannot add listener to graph object')
 
-        return utils._ListenerHandle(listener_ids, self)
-
     def add_ports_connected_listener(self, listener):
         if not callable(listener):
             raise TypeError("'listener' parameter is not callable")
@@ -181,22 +179,13 @@ class Graph(object._SharedObject):
         if listener_ids is None:
             raise bt2._Error('cannot add listener to graph object')
 
-        return utils._ListenerHandle(listener_ids, self)
-
     def run_once(self):
         status = native_bt.graph_run_once(self._ptr)
         utils._handle_func_status(status, 'graph object could not run once')
 
     def run(self):
         status = native_bt.graph_run(self._ptr)
-
-        try:
-            utils._handle_func_status(status, 'graph object stopped running')
-        except bt2.Stop:
-            # done
-            return
-        except Exception:
-            raise
+        utils._handle_func_status(status, 'graph object stopped running')
 
     def add_interrupter(self, interrupter):
         utils._check_type(interrupter, bt2_interrupter.Interrupter)
This page took 0.026532 seconds and 4 git commands to generate.