Remove useless try and import
This commit is contained in:
parent
12ac3686de
commit
f73c433fc7
|
@ -24,7 +24,6 @@ import uuid
|
||||||
import lxml
|
import lxml
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
import kazoo.client
|
|
||||||
from json import loads
|
from json import loads
|
||||||
from re import match as re_match
|
from re import match as re_match
|
||||||
|
|
||||||
|
@ -454,10 +453,7 @@ def findTargetNode(zkhandler, dom_uuid):
|
||||||
def getNodes(zkhandler, node_limit, dom_uuid):
|
def getNodes(zkhandler, node_limit, dom_uuid):
|
||||||
valid_node_list = []
|
valid_node_list = []
|
||||||
full_node_list = zkhandler.children('/nodes')
|
full_node_list = zkhandler.children('/nodes')
|
||||||
try:
|
current_node = zkhandler.read('/domains/{}/node'.format(dom_uuid))
|
||||||
current_node = zkhandler.read('/domains/{}/node'.format(dom_uuid))
|
|
||||||
except kazoo.exceptions.NoNodeError:
|
|
||||||
current_node = None
|
|
||||||
|
|
||||||
for node in full_node_list:
|
for node in full_node_list:
|
||||||
if node_limit and node not in node_limit:
|
if node_limit and node not in node_limit:
|
||||||
|
|
Loading…
Reference in New Issue