mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Only call a callback once for a specific method.
This commit is contained in:
parent
2a637c0b12
commit
f08fcc68d3
1 changed files with 2 additions and 1 deletions
|
@ -145,7 +145,8 @@ class CoreProxy(gobject.GObject):
|
|||
if _func is not None:
|
||||
if (func, args) in self._multi.get_call_list():
|
||||
index = self._multi.get_call_list().index((func, args))
|
||||
self._callbacks[index].append(callback)
|
||||
if callback not in self._callbacks[index]:
|
||||
self._callbacks[index].append(callback)
|
||||
else:
|
||||
if len(args) == 0:
|
||||
_func()
|
||||
|
|
Loading…
Add table
Reference in a new issue