X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nodemanager.py;h=7e7dd9dfde38013fced2c633e723346e23caa1bd;hb=f9cc5266ed55ce904a26fcf86e5c4e466bf52871;hp=a528140deb06747794dc6be22de76899e236847e;hpb=1d330730ef8b1c9bf18e9bc17d57ecdc759d2381;p=nodemanager.git diff --git a/nodemanager.py b/nodemanager.py index a528140..7e7dd9d 100755 --- a/nodemanager.py +++ b/nodemanager.py @@ -74,7 +74,10 @@ class NodeManager: # Deal with plugins directory if os.path.exists(self.options.path): sys.path.append(self.options.path) - plugins = [ os.path.split(os.path.splitext(x)[0])[1] for x in glob.glob( os.path.join(self.options.path,'*.py') ) ] + plugins = [ os.path.split(os.path.splitext(x)[0])[1] + for x in glob.glob( os.path.join(self.options.path,'*.py') ) + if not x.endswith("/__init__.py") + ] self.modules += plugins if self.options.user_module: assert self.options.user_module in self.modules @@ -202,8 +205,13 @@ If this is not the case, please remove the pid file %s. -- exiting""" % (other_p logger.log_exc ("ERROR while loading module %s - skipping:" % module) # if we fail to load any of these, it's really no need to go on any further if module in NodeManager.core_modules: - logger.log("FATAL : failed to load core module %s -- exiting"%module) - sys.exit(1) + logger.log("FATAL : failed to load core module %s"%module) + except AttributeError, err: + # triggered when module doesn't have a 'start' method + logger.log_exc ("ERROR while starting module %s - skipping:" % module) + # if we fail to load any of these, it's really no need to go on any further + if module in NodeManager.core_modules: + logger.log("FATAL : failed to start core module %s"%module) # sort on priority (lower first) def sort_module_priority (m1,m2):