quick frontend (app): replaced OrderedDict by regular dict:
since Python 3.7 dict are officially ordered, so there is no need to use a specific class anymore.
This commit is contained in:
parent
e8aaa9fd43
commit
0bbb13e6c4
1 changed files with 2 additions and 3 deletions
|
|
@ -31,7 +31,6 @@ from sat_frontends.quick_frontend import quick_contact_list
|
||||||
from sat_frontends.quick_frontend.constants import Const as C
|
from sat_frontends.quick_frontend.constants import Const as C
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from collections import OrderedDict
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -320,7 +319,7 @@ class QuickApp(object):
|
||||||
|
|
||||||
# frontend notifications
|
# frontend notifications
|
||||||
self._notif_id = 0
|
self._notif_id = 0
|
||||||
self._notifications = OrderedDict()
|
self._notifications = {}
|
||||||
# watched progresses and associated callbacks
|
# watched progresses and associated callbacks
|
||||||
self._progress_ids = {}
|
self._progress_ids = {}
|
||||||
# available features
|
# available features
|
||||||
|
|
@ -580,7 +579,7 @@ class QuickApp(object):
|
||||||
listener will be callable only by one of the given profiles.
|
listener will be callable only by one of the given profiles.
|
||||||
"""
|
"""
|
||||||
assert type_ in C.LISTENERS
|
assert type_ in C.LISTENERS
|
||||||
self._listeners.setdefault(type_, OrderedDict())[callback] = profiles_filter
|
self._listeners.setdefault(type_, {})[callback] = profiles_filter
|
||||||
|
|
||||||
def removeListener(self, type_, callback):
|
def removeListener(self, type_, callback):
|
||||||
"""Remove a callback from listeners
|
"""Remove a callback from listeners
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue