From 3cf81a33b5ca92276660a6ac12142c1dfd1ff305 Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 11 Nov 2019 17:07:00 +0000 Subject: [PATCH] bug 884 local variable step must be assigned before waitfor_related_HA. CancelledError can be raised Change-Id: Iabff0e1b0cb2cf08ebb35fc7366dd7e8de0a25a9 Signed-off-by: tierno --- osm_lcm/ns.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 4fa0df8..efb69b2 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -738,7 +738,7 @@ class NsLcm(LcmBase): exc = None try: # wait for any previous tasks in process - step = "Waiting for previous tasks" + step = "Waiting for previous operations to terminate" await self.lcm_tasks.waitfor_related_HA('ns', 'nslcmops', nslcmop_id) step = "Getting nslcmop={} from db".format(nslcmop_id) @@ -1936,6 +1936,7 @@ class NsLcm(LcmBase): autoremove = False # autoremove after terminated try: # wait for any previous tasks in process + step = "Waiting for previous operations to terminate" await self.lcm_tasks.waitfor_related_HA("ns", 'nslcmops', nslcmop_id) step = "Getting nslcmop={} from db".format(nslcmop_id) @@ -2297,6 +2298,7 @@ class NsLcm(LcmBase): exc = None try: # wait for any previous tasks in process + step = "Waiting for previous operations to terminate" await self.lcm_tasks.waitfor_related_HA('ns', 'nslcmops', nslcmop_id) step = "Getting information from database" @@ -2430,6 +2432,7 @@ class NsLcm(LcmBase): vnfr_scaled = False try: # wait for any previous tasks in process + step = "Waiting for previous operations to terminate" await self.lcm_tasks.waitfor_related_HA('ns', 'nslcmops', nslcmop_id) step = "Getting nslcmop from database" -- 2.25.1