units manager: handle NotSupportedPluginException
This commit is contained in:
parent
7d80323024
commit
6758775546
2 changed files with 8 additions and 3 deletions
4
tuned/plugins/exceptions.py
Normal file
4
tuned/plugins/exceptions.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import tuned.exceptions
|
||||
|
||||
class NotSupportedPluginException(tuned.exceptions.TunedException):
|
||||
pass
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import tuned.exceptions
|
||||
import tuned.logs
|
||||
import tuned.plugins.exceptions
|
||||
|
||||
log = tuned.logs.get()
|
||||
|
||||
|
|
@ -43,9 +44,9 @@ class Manager(object):
|
|||
try:
|
||||
plugin = self._plugins_repository.create(plugin_name)
|
||||
self._plugins.append(plugin)
|
||||
#except NotSupportedPlugin:
|
||||
# log.info("skipping plugin '%s', not supported on your system" % plugin_name)
|
||||
# continue
|
||||
except tuned.plugins.exceptions.NotSupportedPluginException:
|
||||
log.info("skipping plugin '%s', not supported on your system" % plugin_name)
|
||||
continue
|
||||
except Exception as e:
|
||||
log.error("failed to initialize plugin %s" % plugin_name)
|
||||
log.exception(e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue