Properly remove signals from the map
This commit is contained in:
parent
1529ece057
commit
a1da4bcee8
|
@ -7,9 +7,6 @@ __author__="bjschuma"
|
|||
__date__ ="$Jan 19, 2010 11:10:07 PM$"
|
||||
|
||||
|
||||
from collections import deque
|
||||
|
||||
|
||||
class Map(dict):
|
||||
def __init__(self):
|
||||
dict.__init__(self)
|
||||
|
@ -46,8 +43,9 @@ class Map(dict):
|
|||
return
|
||||
|
||||
items = self.get(key,True)
|
||||
if (item in items) == True:
|
||||
items.remove(item)
|
||||
for tuple in items:
|
||||
if tuple[1]==item:
|
||||
items.remove(tuple)
|
||||
|
||||
|
||||
def delete(self,key):
|
||||
|
|
|
@ -20,6 +20,7 @@ def register(signal,func,priority=100):
|
|||
|
||||
|
||||
def remove(signal,func):
|
||||
global signals
|
||||
signals.remove(signal,func)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue