mirror of
https://github.com/craigerl/aprsd.git
synced 2025-09-04 22:27:50 -04: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
|
import click
|
||||||
|
|
||||||
# local imports here
|
# 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.aprsd import cli
|
||||||
from aprsd.utils import trace
|
from aprsd.utils import trace
|
||||||
|
|
||||||
@ -70,6 +70,14 @@ def test_plugin(
|
|||||||
"""Test an individual APRSD plugin given a python path."""
|
"""Test an individual APRSD plugin given a python path."""
|
||||||
config = ctx.obj["config"]
|
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 aprs_login:
|
||||||
if not config.exists("aprs.login"):
|
if not config.exists("aprs.login"):
|
||||||
click.echo("Must set --aprs_login or APRS_LOGIN")
|
click.echo("Must set --aprs_login or APRS_LOGIN")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user