summaryrefslogtreecommitdiffstats
path: root/ipsilon/util/plugin.py
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-01-23 15:51:20 +0100
committerSimo Sorce <simo@redhat.com>2014-01-24 17:32:18 -0500
commitfe98579005973824000edb91e55975f2e7bf39e1 (patch)
tree92534c4405c8be483dbd3772be299323d6298c63 /ipsilon/util/plugin.py
parent47ff1fb4cd7a6c416c93246decacd19628b232c3 (diff)
downloadipsilon-fe98579005973824000edb91e55975f2e7bf39e1.tar.gz
ipsilon-fe98579005973824000edb91e55975f2e7bf39e1.tar.xz
ipsilon-fe98579005973824000edb91e55975f2e7bf39e1.zip
Use pylint check
Signed-off-by: Petr Vobornik <pvoborni@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/util/plugin.py')
-rwxr-xr-xipsilon/util/plugin.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ipsilon/util/plugin.py b/ipsilon/util/plugin.py
index be9ed02..2db88dd 100755
--- a/ipsilon/util/plugin.py
+++ b/ipsilon/util/plugin.py
@@ -37,11 +37,11 @@ class Plugins(object):
try:
if ext.lower() == '.py':
mod = imp.load_source(name, file_name)
- elif ex.lower() == '.pyc':
+ elif ext.lower() == '.pyc':
mod = imp.load_compiled(name, file_name)
else:
return
- except Exception, e:
+ except Exception, e: # pylint: disable=broad-except
cherrypy.log.error('Failed to load "%s" module: [%s]' % (name, e))
return
@@ -53,12 +53,12 @@ class Plugins(object):
files = None
try:
files = os.listdir(path)
- except Exception, e:
+ except Exception, e: # pylint: disable=broad-except
cherrypy.log.error('No modules in %s: [%s]' % (path, e))
return
for name in files:
- filename = od.path.join(path, name)
+ filename = os.path.join(path, name)
self._load_class(tree, class_type, filename)
def get_providers(self):
@@ -74,7 +74,7 @@ class Plugins(object):
return self._providers_tree
- def get_custom(self, class_type):
+ def get_custom(self, path, class_type):
tree = []
- self._load_classes(tree, class_type)
+ self._load_classes(tree, path, class_type)
return tree