diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/core.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/oxidized/core.rb b/lib/oxidized/core.rb index b70443c..6e7a352 100644 --- a/lib/oxidized/core.rb +++ b/lib/oxidized/core.rb @@ -14,10 +14,13 @@ module Oxidized end class Core + class NoNodesFound < OxidizedError; end + def initialize args Oxidized.mgr = Manager.new Oxidized.Hooks = HookManager.from_config CFG nodes = Nodes.new + raise NoNodesFound, 'source returns no usable nodes' if nodes.size == 0 @worker = Worker.new nodes trap('HUP') { nodes.load } if CFG.rest? |