From 7281f6184f6f8d014790bc295ed091420e341cdf Mon Sep 17 00:00:00 2001 From: licanwei Date: Thu, 13 Jun 2019 17:31:49 +0800 Subject: [PATCH] Remove dead code get_node_by_instance_uuid will never return None, so the OR condition is dead code. Change-Id: I26c553e1067a3cbeac6c0afe1c4bfdee4d939055 --- watcher/decision_engine/model/notification/nova.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watcher/decision_engine/model/notification/nova.py b/watcher/decision_engine/model/notification/nova.py index f4dee54ae..a2254275e 100644 --- a/watcher/decision_engine/model/notification/nova.py +++ b/watcher/decision_engine/model/notification/nova.py @@ -159,7 +159,7 @@ class NovaNotification(base.NotificationEndpoint): try: current_node = ( self.cluster_data_model.get_node_by_instance_uuid( - instance.uuid) or self.get_or_create_node(node.uuid)) + instance.uuid)) except exception.ComputeNodeNotFound as exc: LOG.exception(exc) # If we can't create the node,