diff --git a/frappyman.py b/frappyman.py index 592f65d..23bf727 100644 --- a/frappyman.py +++ b/frappyman.py @@ -104,9 +104,9 @@ def summarize_server_state(givencfgs, ourcfgs, sealist, sea_info, strict=False): for seacfg, seacfgfile, key in zip_longest(sealist, seacfgfiles, ('main', 'stick')): if not seacfg: continue - available = sea_info[seacfg] + available = sea_info[seacfg + SEAEXT.get(key, '.addon')] if available: - proposed = available[0] if len(available) == 1 else None + proposed = list(available)[0] if len(available) == 1 else None if not proposed: running = None for item in available: @@ -336,7 +336,6 @@ class FrappyManager(ServiceManager): if cfg not in all_cfg: if sea_cfg and sea_info is not None: sea_info.setdefault(sea_cfg, set()).add(cfg) - sea_info[cfg] = sea_cfg all_cfg.add(cfg) if list_info is not None: list_info.setdefault(cfgdir, {})[cfg] = desc.split('\n', 1)[0] @@ -356,7 +355,7 @@ class FrappyManager(ServiceManager): inverted_sea_info = {} for seacfg, cfgset in sea_info.items(): for cfg in cfgset: - inverted_sea_info[seacfg] = cfg + inverted_sea_info[cfg] = seacfg ambiguous = 0 keylen = max(max(len(k) for k in cfgs) for cfgs in list_info.values()) for cfgdir, cfgs in list_info.items():