bug 847. Fix KeyError vim_status when copying values between related tasks 47/7947/1 feature7148
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 13 Sep 2019 08:36:24 +0000 (08:36 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 13 Sep 2019 08:36:34 +0000 (08:36 +0000)
Change-Id: I41ab184c553f8737d1d8e4cd58533b4531f3f5fe
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
openmanod
osm_ro/vim_thread.py

index 90f3a4b..ecd9972 100755 (executable)
--- a/openmanod
+++ b/openmanod
@@ -53,7 +53,7 @@ import osm_ro
 
 __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes"
 __date__ = "$26-aug-2014 11:09:29$"
-__version__ = "6.0.2.post1"
+__version__ = "6.0.2.post2"
 version_date = "Sep 2019"
 database_version = 39      # expected database schema version
 
index f185db8..38a73d1 100644 (file)
@@ -576,7 +576,7 @@ class vim_thread(threading.Thread):
                 task["error_msg"] = related_tasks[0]["error_msg"]
                 task["vim_id"] = related_tasks[0]["vim_id"]
                 extra = yaml.load(related_tasks[0]["extra"])
-                task["extra"]["vim_status"] = extra["vim_status"]
+                task["extra"]["vim_status"] = extra.get("vim_status")
                 next_refresh = related_tasks[0]["modified_at"] + 0.001
                 database_update = {"status": task["extra"].get("vim_status", "VIM_ERROR"),
                                    "error_msg": task["error_msg"]}