##// END OF EJS Templates
add unregister_target to CommManagers
MinRK -
Show More
@@ -45,6 +45,11 b' var IPython = (function (IPython) {'
45 this.targets[target_name] = f;
45 this.targets[target_name] = f;
46 };
46 };
47
47
48 CommManager.prototype.unregister_target = function (target_name, f) {
49 // Unregister a target function for a given target name
50 delete this.targets[target_name];
51 };
52
48 CommManager.prototype.register_comm = function (comm) {
53 CommManager.prototype.register_comm = function (comm) {
49 // Register a comm in the mapping
54 // Register a comm in the mapping
50 this.comms[comm.comm_id] = comm;
55 this.comms[comm.comm_id] = comm;
@@ -89,6 +89,10 b' class CommManager(LoggingConfigurable):'
89
89
90 self.targets[target_name] = f
90 self.targets[target_name] = f
91
91
92 def unregister_target(self, target_name, f):
93 """Unregister a callable registered with register_target"""
94 return self.targets.pop(target_name);
95
92 def register_comm(self, comm):
96 def register_comm(self, comm):
93 """Register a new comm"""
97 """Register a new comm"""
94 comm_id = comm.comm_id
98 comm_id = comm.comm_id
General Comments 0
You need to be logged in to leave comments. Login now