2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00

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.
This commit is contained in:
Jarrod Johnson 2019-01-31 15:58:57 -05:00
parent 337ab3b1a0
commit 2e93af9b5e

View File

@ -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: