From 53a8517464b89689b00d27fb6f41f0f760fd8d6d Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Tue, 28 Jun 2022 14:49:04 +0200 Subject: [PATCH] fix return value of frappy command --- commands.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/commands.py b/commands.py index 1508a69..ba8b8b0 100644 --- a/commands.py +++ b/commands.py @@ -60,10 +60,16 @@ SERVICES = FrappyManager.services def all_info(all_cfg): info = [] - for srv, cfginfo in all_cfg.items(): - if cfginfo is not None: - info.append('frappy_%s(%r)' % (srv, cfginfo)) - return 'currently configured: %s' % ', '.join(info) + addkwd = False + for srv in SERVICES: + cfginfo = all_cfg.get(srv) + if cfginfo is None: + addkwd = True + elif addkwd: + info.append('%s=%r' % (srv, cfginfo)) + else: + info.append(repr(cfginfo)) + return 'currently configured: frappy(%s)' % ', '.join(info) def frappy_start(**services):