From: tierno Date: Fri, 13 Sep 2019 08:36:24 +0000 (+0000) Subject: bug 847. Fix KeyError vim_status when copying values between related tasks X-Git-Tag: v7.0.0rc1~20 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F7947%2F1;p=osm%2FRO.git bug 847. Fix KeyError vim_status when copying values between related tasks Change-Id: I41ab184c553f8737d1d8e4cd58533b4531f3f5fe Signed-off-by: tierno --- diff --git a/openmanod b/openmanod index 90f3a4b4..ecd99720 100755 --- 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 diff --git a/osm_ro/vim_thread.py b/osm_ro/vim_thread.py index f185db81..38a73d12 100644 --- a/osm_ro/vim_thread.py +++ b/osm_ro/vim_thread.py @@ -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"]}