Mercurial > libervia-backend
changeset 3912:ce5d03772689
core (main): `OrderedDict` is not necesasry here anymore, as `dict` are now ordered
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 24 Sep 2022 16:08:26 +0200 (2022-09-24) |
parents | 8289ac1b34f4 |
children | 944f51f9c2b4 |
files | sat/core/sat_main.py |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/core/sat_main.py Tue Aug 23 21:06:24 2022 +0200 +++ b/sat/core/sat_main.py Sat Sep 24 16:08:26 2022 +0200 @@ -50,11 +50,6 @@ import sat.plugins -try: - from collections import OrderedDict # only available from python 2.7 -except ImportError: - from ordereddict import OrderedDict - log = getLogger(__name__) class SAT(service.Service): @@ -64,9 +59,8 @@ # this _init is called in startService log.info(f"{C.APP_NAME} {self.full_version}") self._cb_map = {} # map from callback_id to callbacks - self._menus = ( - OrderedDict() - ) # dynamic menus. key: callback_id, value: menu data (dictionnary) + # dynamic menus. key: callback_id, value: menu data (dictionnary) + self._menus = {} self._menus_paths = {} # path to id. key: (menu_type, lower case tuple of path), # value: menu id self.initialised = defer.Deferred()