sample-config fix

This patch makes a change on how it's calling importlib.entry_points
to only fetch the group we want, which is 'oslo.config.opts'.
This fixes a problem with python 3.12 compatibility.
This commit is contained in:
Hemna 2024-03-11 11:53:28 -04:00
parent 2e9c9d40e1
commit 0ca5ceee7e
1 changed files with 1 additions and 6 deletions

View File

@ -125,12 +125,7 @@ def sample_config(ctx):
def get_namespaces():
args = []
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)
selected = imp.entry_points(group="oslo.config.opts")
for entry in selected:
if "aprsd" in entry.name:
args.append("--namespace")