mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-18 06:11:49 -05:00
Dump config with aprsd dev test-plugin
This patch adds the dumping of the config read for the aprsd dev test-plugin command
This commit is contained in:
parent
075078b520
commit
fc1ca52593
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user