From 2e93af9b5ee1e0f0c4bb171b3781543384e070ea Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 31 Jan 2019 15:58:57 -0500 Subject: [PATCH] Treat '' same as None for plugin specification From the CLI, both are the same and there is no good reason to treat them differently from each other. --- confluent_server/confluent/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/core.py b/confluent_server/confluent/core.py index 3976e7f4..015b55aa 100644 --- a/confluent_server/confluent/core.py +++ b/confluent_server/confluent/core.py @@ -651,7 +651,7 @@ def handle_dispatch(connection, cert, dispatch, peername): plugpath = nodeattr[node][attrname]['value'] elif 'default' in plugroute: plugpath = plugroute['default'] - if plugpath is not None: + if plugpath: try: hfunc = getattr(pluginmap[plugpath], operation) except KeyError: @@ -809,7 +809,7 @@ def handle_node_request(configmanager, inputdata, operation, elif list(cfm.list_collective()): badcollnodes.append(node) continue - if plugpath is not None: + if plugpath: try: hfunc = getattr(pluginmap[plugpath], operation) except KeyError: