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:
Goffi 2020-02-12 19:40:48 +01:00
commit 0bbb13e6c4

View file

@ -31,7 +31,6 @@ from sat_frontends.quick_frontend import quick_contact_list
from sat_frontends.quick_frontend.constants import Const as C
import sys
from collections import OrderedDict
import time
@ -320,7 +319,7 @@ class QuickApp(object):
# frontend notifications
self._notif_id = 0
self._notifications = OrderedDict()
self._notifications = {}
# watched progresses and associated callbacks
self._progress_ids = {}
# available features
@ -580,7 +579,7 @@ class QuickApp(object):
listener will be callable only by one of the given profiles.
"""
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):
"""Remove a callback from listeners