Skip to contentSkip to conversation

lib/oeqa/controllers: extend search path

PATCH New Ross Burton 1 participant 1 message Oct 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/oeqa/controllers: extend search path

When multiple locations can provide modules in the same package, the search path needs to be extended with pkgutil.extend_path. Otherwise the search will end early and not iterate through each of the providers.

---
 lib/oeqa/controllers/__init__.py | 3 +++
 1 file changed, 3 insertions(+)
lib/oeqa/controllers/__init__.py +3 -0
index e69de29..df3c142 100644
@@ -0,0 +1,3 @@
+# This is needed so that multiple locations can provide the same package
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
Signature · 1 line
2.25.1