Compare commits

...

3 Commits

Author SHA1 Message Date
Hemna e9febbbc52 Fixed entry_points 2024-04-21 12:33:03 -04:00
Hemna fa9ff7d77f Fix for entry_points where python < 3.10
python 3.10 has importlib_metadata.entry_points(group) parameter
it seems that less than 3.10 doesn't.  this patch test for
python version to see how to get the entry point groups.
2024-04-21 12:30:29 -04:00
Hemna 8e0de9c5ac Fix for sample-config warning
This patch fixes a small issue with the sample-config command
outputting a warning during generation.
2024-03-27 10:28:42 -04:00
3 changed files with 23 additions and 2 deletions

View File

@ -1,9 +1,15 @@
CHANGES
=======
v3.3.3
------
* Fix for sample-config warning
v3.3.2
------
* Changelog for 3.3.2
* Remove warning during sample-config
* Removed print in utils

View File

@ -228,7 +228,7 @@ webchat_opts = [
]
registry_opts = [
cfg.StrOpt(
cfg.BoolOpt(
"enabled",
default=False,
help="Enable sending aprs registry information. This will let the "

View File

@ -122,10 +122,25 @@ def check_version(ctx):
def sample_config(ctx):
"""Generate a sample Config file from aprsd and all installed plugins."""
def _get_selected_entry_points():
import sys
if sys.version_info < (3, 10):
all = imp.entry_points()
selected = []
if "oslo.config.opts" in all:
for x in all["oslo.config.opts"]:
if x.group == "oslo.config.opts":
selected.append(x)
else:
selected = imp.entry_points(group="oslo.config.opts")
return selected
def get_namespaces():
args = []
selected = imp.entry_points(group="oslo.config.opts")
# selected = imp.entry_points(group="oslo.config.opts")
selected = _get_selected_entry_points()
for entry in selected:
if "aprsd" in entry.name:
args.append("--namespace")