From e7c6dfab2ba05698d7edd9c256e943e6e685c081 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 6 Oct 2017 14:02:49 -0400 Subject: [PATCH] Fix list by invalid type Rather than list everything, list nothing when asked to list an invalid type. --- confluent_server/confluent/discovery/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index 996818ff..ecb3bd79 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -329,7 +329,7 @@ def _parameterize_path(pathcomponents): if key not in validselectors: raise exc.NotFoundException('{0} is not valid here'.format(key)) if key == 'by-type': - keyparams[key] = servicebyname.get(val, None) + keyparams[key] = servicebyname.get(val, '!!!!invalid-type') else: keyparams[key] = val validselectors.discard(key)