aprsd 3.3.0__py2.py3-none-any.whl → 3.3.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aprsd/cli_helper.py +5 -4
- aprsd/cmds/fetch_stats.py +5 -1
- aprsd/log/log.py +0 -18
- {aprsd-3.3.0.dist-info → aprsd-3.3.1.dist-info}/METADATA +1 -1
- {aprsd-3.3.0.dist-info → aprsd-3.3.1.dist-info}/RECORD +10 -10
- aprsd-3.3.1.dist-info/pbr.json +1 -0
- aprsd-3.3.0.dist-info/pbr.json +0 -1
- {aprsd-3.3.0.dist-info → aprsd-3.3.1.dist-info}/LICENSE +0 -0
- {aprsd-3.3.0.dist-info → aprsd-3.3.1.dist-info}/WHEEL +0 -0
- {aprsd-3.3.0.dist-info → aprsd-3.3.1.dist-info}/entry_points.txt +0 -0
- {aprsd-3.3.0.dist-info → aprsd-3.3.1.dist-info}/top_level.txt +0 -0
aprsd/cli_helper.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
import click
|
2
1
|
from functools import update_wrapper
|
3
2
|
import logging
|
4
3
|
from pathlib import Path
|
5
4
|
import typing as t
|
5
|
+
|
6
|
+
import click
|
6
7
|
from oslo_config import cfg
|
7
8
|
|
8
9
|
import aprsd
|
@@ -58,7 +59,7 @@ class AliasedGroup(click.Group):
|
|
58
59
|
Copied from `click` and extended for `aliases`.
|
59
60
|
"""
|
60
61
|
def decorator(f):
|
61
|
-
aliases = kwargs.pop(
|
62
|
+
aliases = kwargs.pop("aliases", [])
|
62
63
|
cmd = click.decorators.command(*args, **kwargs)(f)
|
63
64
|
self.add_command(cmd)
|
64
65
|
for alias in aliases:
|
@@ -74,7 +75,7 @@ class AliasedGroup(click.Group):
|
|
74
75
|
Copied from `click` and extended for `aliases`.
|
75
76
|
"""
|
76
77
|
def decorator(f):
|
77
|
-
aliases = kwargs.pop(
|
78
|
+
aliases = kwargs.pop("aliases", [])
|
78
79
|
cmd = click.decorators.group(*args, **kwargs)(f)
|
79
80
|
self.add_command(cmd)
|
80
81
|
for alias in aliases:
|
@@ -137,7 +138,7 @@ def process_standard_options_no_config(f: F) -> F:
|
|
137
138
|
ctx.obj["loglevel"] = kwargs["loglevel"]
|
138
139
|
ctx.obj["config_file"] = kwargs["config_file"]
|
139
140
|
ctx.obj["quiet"] = kwargs["quiet"]
|
140
|
-
log.
|
141
|
+
log.setup_logging(
|
141
142
|
ctx.obj["loglevel"],
|
142
143
|
ctx.obj["quiet"],
|
143
144
|
)
|
aprsd/cmds/fetch_stats.py
CHANGED
@@ -58,7 +58,11 @@ def fetch_stats(ctx, host, port, magic_word):
|
|
58
58
|
with console.status(msg):
|
59
59
|
client = rpc_client.RPCClient(host, port, magic_word)
|
60
60
|
stats = client.get_stats_dict()
|
61
|
-
|
61
|
+
if stats:
|
62
|
+
console.print_json(data=stats)
|
63
|
+
else:
|
64
|
+
LOG.error(f"Failed to fetch stats via RPC aprsd server at {host}:{port}")
|
65
|
+
return
|
62
66
|
aprsd_title = (
|
63
67
|
"APRSD "
|
64
68
|
f"[bold cyan]v{stats['aprsd']['version']}[/] "
|
aprsd/log/log.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import logging
|
2
|
-
from logging import NullHandler
|
3
2
|
from logging.handlers import QueueHandler
|
4
3
|
import queue
|
5
4
|
import sys
|
@@ -96,20 +95,3 @@ def setup_logging(loglevel=None, quiet=False):
|
|
96
95
|
|
97
96
|
# configure loguru
|
98
97
|
logger.configure(handlers=handlers)
|
99
|
-
|
100
|
-
|
101
|
-
def setup_logging_no_config(loglevel, quiet):
|
102
|
-
log_level = conf.log.LOG_LEVELS[loglevel]
|
103
|
-
LOG.setLevel(log_level)
|
104
|
-
log_format = CONF.logging.logformat
|
105
|
-
date_format = CONF.logging.date_format
|
106
|
-
log_formatter = logging.Formatter(fmt=log_format, datefmt=date_format)
|
107
|
-
fh = NullHandler()
|
108
|
-
|
109
|
-
fh.setFormatter(log_formatter)
|
110
|
-
LOG.addHandler(fh)
|
111
|
-
|
112
|
-
if not quiet:
|
113
|
-
sh = logging.StreamHandler(sys.stdout)
|
114
|
-
sh.setFormatter(log_formatter)
|
115
|
-
LOG.addHandler(sh)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
aprsd/__init__.py,sha256=GiMknvhvMBWeMsJXiBS8slVBJdwX9h3FjnXqGjm8YZM,631
|
2
|
-
aprsd/cli_helper.py,sha256=
|
2
|
+
aprsd/cli_helper.py,sha256=AgSSn6oTUdCDv4Ne1Jyg_0bi7GwINBBKotTLk_QE-cY,4568
|
3
3
|
aprsd/client.py,sha256=7NI_xFUoPaAyVHMIogpedZjWhMZaK5ZYEQWsk9aAukQ,10072
|
4
4
|
aprsd/exception.py,sha256=FyeehwYENwsRKyrU2WmgEPmcHsDLjdGRAe35f01Bu5A,502
|
5
5
|
aprsd/main.py,sha256=E78yXv6qPvzxatYF7fz5epWAYf8YpRJpt7sR9malhY0,4567
|
@@ -15,7 +15,7 @@ aprsd/clients/kiss.py,sha256=Cc26CbgDaJ9WfGfIHOhfTn7XdDnYWLLv85Xj4oD2_6U,3393
|
|
15
15
|
aprsd/cmds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
aprsd/cmds/completion.py,sha256=4gTd6QLs97qZARraSEgAjudthdSGURecjjmC6JZtXXk,1763
|
17
17
|
aprsd/cmds/dev.py,sha256=ob5vKomigQdHuFt7aWU0YLaeXKsWbm3dqyYTf0qztIc,4369
|
18
|
-
aprsd/cmds/fetch_stats.py,sha256=
|
18
|
+
aprsd/cmds/fetch_stats.py,sha256=BgQcuDHLp7XiKGBFv_CI0RqqZTdvZMjG7bwl_Vm3UKs,5489
|
19
19
|
aprsd/cmds/healthcheck.py,sha256=HhCFnaWNlyGbYiBZx_1APh4v36t8CUNGyi41mdcuSDg,2801
|
20
20
|
aprsd/cmds/list_plugins.py,sha256=wGBEjINDDmvvW8wdiyuh7HsTUKxl69vxCvcDmgfyzRE,10667
|
21
21
|
aprsd/cmds/listen.py,sha256=ndrQct8Vo1zrTS2Dh4FYD8TEhAsIjPnQZIyaQUHPum0,6241
|
@@ -30,7 +30,7 @@ aprsd/conf/opts.py,sha256=Jq1DPyDdNyN2rbuHq8O-lF2Entkb9tFTbh9gjZwWC5s,2701
|
|
30
30
|
aprsd/conf/plugin_common.py,sha256=HKNV2JKCJOPUqTdoFgc96mGNZLU6zNii2syjuJj8tAo,6253
|
31
31
|
aprsd/conf/plugin_email.py,sha256=IB8G_vTCC-6HVGx9y1PP2vKXfXRzlEx9lEFXdIIGHzA,2332
|
32
32
|
aprsd/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
|
-
aprsd/log/log.py,sha256=
|
33
|
+
aprsd/log/log.py,sha256=Lytim2gK7gm3VoMDqJkXS1s28lXuahz2vX1Z7cvn_zw,2698
|
34
34
|
aprsd/packets/__init__.py,sha256=h3cq6MCjvztM2GBeHagay0chEcJWKophT22PLktGYzg,434
|
35
35
|
aprsd/packets/core.py,sha256=I5ajk1EJoNPpOjndTG9kddaV8Y3x_gdxoa7TqOWwGCo,22655
|
36
36
|
aprsd/packets/packet_list.py,sha256=CeDD9uV3YTnnXmH52rdAkN4AswY8A710fQ2NSLicCcw,2444
|
@@ -122,10 +122,10 @@ aprsd/web/chat/static/js/upstream/socket.io.min.js,sha256=dYF5MG5zs6ekpbIOXBXelJ
|
|
122
122
|
aprsd/web/chat/static/json-viewer/jquery.json-viewer.css,sha256=rXfxviikI1RGZM3px6piq9ZL0YZuO5ETcO8-toY-DDY,1080
|
123
123
|
aprsd/web/chat/static/json-viewer/jquery.json-viewer.js,sha256=klSHtWPkZv4zG4darvDEpAQ9hJFDqNbQrM-xDChm8Fo,5020
|
124
124
|
aprsd/web/chat/templates/index.html,sha256=vxa0VV3ZIGfv8x1VwCeamJhdyNQ1QpsU_tNHoIrBTXs,6566
|
125
|
-
aprsd-3.3.
|
126
|
-
aprsd-3.3.
|
127
|
-
aprsd-3.3.
|
128
|
-
aprsd-3.3.
|
129
|
-
aprsd-3.3.
|
130
|
-
aprsd-3.3.
|
131
|
-
aprsd-3.3.
|
125
|
+
aprsd-3.3.1.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
126
|
+
aprsd-3.3.1.dist-info/METADATA,sha256=NqiTMT3tadixMg96jfaI2erlBKSCnV-nqI8-76wM5cI,24038
|
127
|
+
aprsd-3.3.1.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
|
128
|
+
aprsd-3.3.1.dist-info/entry_points.txt,sha256=4fReoJUB-bFqOUK6eeXYYCvTdVLprL7KVH0hWQRP9eM,171
|
129
|
+
aprsd-3.3.1.dist-info/pbr.json,sha256=IQnKA75aOp451NIXVUhswWOZlCWPrOsdsdwJVaUKe04,46
|
130
|
+
aprsd-3.3.1.dist-info/top_level.txt,sha256=v1O96niUcJOTMh9aQnFRknbScJ6mMOwqurdbxeaeSjs,6
|
131
|
+
aprsd-3.3.1.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
{"git_version": "10d023d", "is_release": true}
|
aprsd-3.3.0.dist-info/pbr.json
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"git_version": "c37e1d5", "is_release": true}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|