From 5152759270068a579e9dcd5eb95ce57c639a4249 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 18 Apr 2014 14:50:43 -0400 Subject: [PATCH] Provide correct response when a node does not exist --- confluent/pluginapi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent/pluginapi.py b/confluent/pluginapi.py index 49db747c..7dc6c32e 100644 --- a/confluent/pluginapi.py +++ b/confluent/pluginapi.py @@ -324,6 +324,8 @@ def handle_path(path, operation, configmanager, inputdata=None): elif 'pluginattrs' in plugroute: nodeattr = configmanager.get_node_attributes( [node], plugroute['pluginattrs']) + if node not in nodeattr: + raise exc.NotFoundException("Invalid node %s" % node) plugpath = None if 'default' in plugroute: plugpath = plugroute['default']