From fc1ca525934c13a72c1e0315898776a57a675814 Mon Sep 17 00:00:00 2001 From: Hemna Date: Wed, 23 Nov 2022 12:52:16 -0500 Subject: [PATCH] Dump config with aprsd dev test-plugin This patch adds the dumping of the config read for the aprsd dev test-plugin command --- aprsd/cmds/dev.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aprsd/cmds/dev.py b/aprsd/cmds/dev.py index bbe1e59..c3979ed 100644 --- a/aprsd/cmds/dev.py +++ b/aprsd/cmds/dev.py @@ -8,7 +8,7 @@ import logging import click # local imports here -from aprsd import cli_helper, client, messaging, packets, plugin, stats +from aprsd import cli_helper, client, messaging, packets, plugin, stats, utils from aprsd.aprsd import cli from aprsd.utils import trace @@ -70,6 +70,14 @@ def test_plugin( """Test an individual APRSD plugin given a python path.""" config = ctx.obj["config"] + flat_config = utils.flatten_dict(config) + LOG.info("Using CONFIG values:") + for x in flat_config: + if "password" in x or "aprsd.web.users.admin" in x: + LOG.info(f"{x} = XXXXXXXXXXXXXXXXXXX") + else: + LOG.info(f"{x} = {flat_config[x]}") + if not aprs_login: if not config.exists("aprs.login"): click.echo("Must set --aprs_login or APRS_LOGIN")