From f73c433fc7b92a3251ce885937fafdd4f8bf6e2a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 1 Jun 2021 12:05:17 -0400 Subject: [PATCH] Remove useless try and import --- daemon-common/common.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/daemon-common/common.py b/daemon-common/common.py index 44d8207d..a6907669 100644 --- a/daemon-common/common.py +++ b/daemon-common/common.py @@ -24,7 +24,6 @@ import uuid import lxml import shlex import subprocess -import kazoo.client from json import loads from re import match as re_match @@ -454,10 +453,7 @@ def findTargetNode(zkhandler, dom_uuid): def getNodes(zkhandler, node_limit, dom_uuid): valid_node_list = [] full_node_list = zkhandler.children('/nodes') - try: - current_node = zkhandler.read('/domains/{}/node'.format(dom_uuid)) - except kazoo.exceptions.NoNodeError: - current_node = None + current_node = zkhandler.read('/domains/{}/node'.format(dom_uuid)) for node in full_node_list: if node_limit and node not in node_limit: