bug 884 local variable step must be assigned before waitfor_related_HA. CancelledError can be raised
Change-Id: Iabff0e1b0cb2cf08ebb35fc7366dd7e8de0a25a9
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
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 @@
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 @@
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 @@
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 @@
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"