From 1ce4dbb8ba49f5621b3ba6d85a149b48f1dc9031 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Thu, 15 Jun 2006 17:39:37 +0000 Subject: [PATCH 1/1] use import from tools --- lib/python/Components/PluginComponent.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index 095be396..dd29628b 100644 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -1,16 +1,9 @@ import os from Tools.Directories import * +from Tools.Import import my_import from Plugins.Plugin import PluginDescriptor -def my_import(name): - print name - mod = __import__(name) - components = name.split('.') - for comp in components[1:]: - mod = getattr(mod, comp) - return mod - class PluginComponent: def __init__(self): self.plugins = {} -- 2.30.2