From 0ca5ceee7e50387a65d538a32b2da614e1ca7cb9 Mon Sep 17 00:00:00 2001 From: Hemna Date: Mon, 11 Mar 2024 11:53:28 -0400 Subject: [PATCH] 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. --- aprsd/main.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/aprsd/main.py b/aprsd/main.py index 9dbb65f..8103bfd 100644 --- a/aprsd/main.py +++ b/aprsd/main.py @@ -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")