From 08f920351884a4dfaffa4eb7423cce04374b9958 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 30 Jan 2020 19:14:42 +0100 Subject: search for alloc_foo in src/allocators/alloc.py --- src/allocator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allocator.py b/src/allocator.py index 7b76543..fe31ed4 100644 --- a/src/allocator.py +++ b/src/allocator.py @@ -225,8 +225,8 @@ def collect_allocators(allocators): ret.update(read_allocators_collection_file(name)) # file is one of our allocator definitions import it - elif os.path.isfile("src/allocators/" + name + ".py"): - module = importlib.import_module('src.allocators.' + name) + elif os.path.isfile("src/allocators/" + name.split('_')[0] + ".py"): + module = importlib.import_module('src.allocators.' + name.split('_')[0]) # name is collection if hasattr(module, "allocators"): for alloc in module.allocators: -- cgit v1.2.3