1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-08-16 16:43:52 -04:00

Compare commits

..

6 Commits

Author SHA1 Message Date
hemna 71cd7e0ab5 Changelog for 3.3.2 2024-03-13 13:49:11 -04:00
hemna d485f484ec Remove warning during sample-config
This patch removes a warning log during sample-config
generation
2024-03-13 13:47:01 -04:00
hemna f810c02d5d Removed print in utils
this patch removes a leftover debug print in utils.load_entry_points
that was causing sample-config output to be bogus.
2024-03-13 13:44:09 -04:00
hemna 50e24abb81 Updates for 3.3.1 2024-03-12 10:41:16 -04:00
hemna 10d023dd7b Fixed failure with fetch-stats
This patch fails nicely with the fetch-stats if it can't connect
with the rpc server on the other end.
2024-03-12 10:37:17 -04:00
hemna cb9456b29d Fixed problem with list-plugins
This patch includes a fix to the list-plugins and
list-extensions commands.
2024-03-12 10:36:26 -04:00
6 changed files with 25 additions and 26 deletions
+14
View File
@@ -1,9 +1,23 @@
CHANGES
=======
v3.3.2
------
* Remove warning during sample-config
* Removed print in utils
v3.3.1
------
* Updates for 3.3.1
* Fixed failure with fetch-stats
* Fixed problem with list-plugins
v3.3.0
------
* Changelog for 3.3.0
* sample-config fix
* Fixed registry url post
* Changed processpkt message
+5 -4
View File
@@ -1,8 +1,9 @@
import click
from functools import update_wrapper
import logging
from pathlib import Path
import typing as t
import click
from oslo_config import cfg
import aprsd
@@ -58,7 +59,7 @@ class AliasedGroup(click.Group):
Copied from `click` and extended for `aliases`.
"""
def decorator(f):
aliases = kwargs.pop('aliases', [])
aliases = kwargs.pop("aliases", [])
cmd = click.decorators.command(*args, **kwargs)(f)
self.add_command(cmd)
for alias in aliases:
@@ -74,7 +75,7 @@ class AliasedGroup(click.Group):
Copied from `click` and extended for `aliases`.
"""
def decorator(f):
aliases = kwargs.pop('aliases', [])
aliases = kwargs.pop("aliases", [])
cmd = click.decorators.group(*args, **kwargs)(f)
self.add_command(cmd)
for alias in aliases:
@@ -137,7 +138,7 @@ def process_standard_options_no_config(f: F) -> F:
ctx.obj["loglevel"] = kwargs["loglevel"]
ctx.obj["config_file"] = kwargs["config_file"]
ctx.obj["quiet"] = kwargs["quiet"]
log.setup_logging_no_config(
log.setup_logging(
ctx.obj["loglevel"],
ctx.obj["quiet"],
)
+5 -1
View File
@@ -58,7 +58,11 @@ def fetch_stats(ctx, host, port, magic_word):
with console.status(msg):
client = rpc_client.RPCClient(host, port, magic_word)
stats = client.get_stats_dict()
console.print_json(data=stats)
if stats:
console.print_json(data=stats)
else:
LOG.error(f"Failed to fetch stats via RPC aprsd server at {host}:{port}")
return
aprsd_title = (
"APRSD "
f"[bold cyan]v{stats['aprsd']['version']}[/] "
-18
View File
@@ -1,5 +1,4 @@
import logging
from logging import NullHandler
from logging.handlers import QueueHandler
import queue
import sys
@@ -96,20 +95,3 @@ def setup_logging(loglevel=None, quiet=False):
# configure loguru
logger.configure(handlers=handlers)
def setup_logging_no_config(loglevel, quiet):
log_level = conf.log.LOG_LEVELS[loglevel]
LOG.setLevel(log_level)
log_format = CONF.logging.logformat
date_format = CONF.logging.date_format
log_formatter = logging.Formatter(fmt=log_format, datefmt=date_format)
fh = NullHandler()
fh.setFormatter(log_formatter)
LOG.addHandler(fh)
if not quiet:
sh = logging.StreamHandler(sys.stdout)
sh.setFormatter(log_formatter)
LOG.addHandler(sh)
-1
View File
@@ -145,7 +145,6 @@ def sample_config(ctx):
if not sys.argv[1:]:
raise SystemExit
raise
LOG.warning(conf.namespace)
generator.generate(conf)
return
+1 -2
View File
@@ -19,7 +19,7 @@ from .ring_buffer import RingBuffer # noqa: F401
if sys.version_info.major == 3 and sys.version_info.minor >= 3:
from collections.abc import MutableMapping
else:
from collections import MutableMapping
from collections.abc import MutableMapping
def env(*vars, **kwargs):
@@ -136,7 +136,6 @@ def parse_delta_str(s):
def load_entry_points(group):
"""Load all extensions registered to the given entry point group"""
print(f"Loading extensions for group {group}")
try:
import importlib_metadata
except ImportError: