diff --git a/artifactor/plugins/filedump.py b/artifactor/plugins/filedump.py index 210d44f8bd..0738b37f7c 100644 --- a/artifactor/plugins/filedump.py +++ b/artifactor/plugins/filedump.py @@ -61,6 +61,8 @@ def filedump( ): if not slaveid: slaveid = "Master" + if slaveid not in self.store: + self.store[slaveid] = {} test_ident = "{}/{}".format( self.store[slaveid]["test_location"], self.store[slaveid]["test_name"] ) diff --git a/artifactor/plugins/ostriz.py b/artifactor/plugins/ostriz.py index 736b2e6a3b..5358561715 100644 --- a/artifactor/plugins/ostriz.py +++ b/artifactor/plugins/ostriz.py @@ -58,7 +58,7 @@ def ostriz_send( json_data["jenkins"] = jenkins or None # Either None or a list of Polarion Test Case IDs json_data["polarion"] = polarion_ids - if not json_data["params"]: + if not json_data.get("params"): json_data["params"] = {} json_data["params"].update(env_params) requests.post(self.url, data=json.dumps(json_data)) diff --git a/artifactor/plugins/reporter.py b/artifactor/plugins/reporter.py index 5aacddb931..a18cfb659f 100644 --- a/artifactor/plugins/reporter.py +++ b/artifactor/plugins/reporter.py @@ -257,7 +257,7 @@ def build_dict(self, path, container, contents): if not end: container["_sub"][head] = contents container["_stats"][contents["outcomes"]["overall"]] += 1 - container["_duration"] += contents["duration"] + container["_duration"] += contents.get("duration", 0) # If we are in a module. else: if head not in container["_sub"]: @@ -265,7 +265,7 @@ def build_dict(self, path, container, contents): # Call again to recurse down the tree. self.build_dict(end, container["_sub"][head], contents) container["_stats"][contents["outcomes"]["overall"]] += 1 - container["_duration"] += contents["duration"] + container["_duration"] += contents.get("duration", 0) def build_li(self, lev): """