changeset 3166:122075ceaa53

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.
author Goffi <goffi@goffi.org>
date Wed, 12 Feb 2020 19:40:48 +0100
parents 7699a08ba8fb
children d0fb79f97466
files sat_frontends/quick_frontend/quick_app.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/sat_frontends/quick_frontend/quick_app.py	Wed Feb 12 19:38:32 2020 +0100
+++ b/sat_frontends/quick_frontend/quick_app.py	Wed Feb 12 19:40:48 2020 +0100
@@ -31,7 +31,6 @@
 from sat_frontends.quick_frontend.constants import Const as C
 
 import sys
-from collections import OrderedDict
 import time
 
 
@@ -320,7 +319,7 @@
 
         # 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 @@
             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