From b2d54bf2f5d9690664df3f83232c00b4bcb12a18 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 9 Feb 2014 19:30:46 -0500 Subject: [PATCH] Correctly detect invalid requests for a particular node --- confluent/pluginapi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent/pluginapi.py b/confluent/pluginapi.py index 994a57f6..e7df8104 100644 --- a/confluent/pluginapi.py +++ b/confluent/pluginapi.py @@ -126,6 +126,9 @@ def delete_node_collection(collectionpath, configmanager): def enumerate_node_collection(collectionpath, configmanager): if collectionpath == ['node']: # it is just '/node/', need a list of nodes return iterate_collections(configmanager.get_nodes()) + node = collectionpath[1] + if not configmanager.is_node(node): + raise exc.NotFoundException("Invalid element requested") del collectionpath[0:2] collection = nested_lookup(noderesources, collectionpath) return iterate_resources(collection)