Skip to content

Commit

Permalink
Merge pull request #2855 from chaoss/add-json-parse-handle
Browse files Browse the repository at this point in the history
add empty output handle
  • Loading branch information
sgoggins authored Jul 1, 2024
2 parents 65ba252 + 9e8795e commit c1b7a84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions augur/tasks/start_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ def non_repo_domain_tasks(self):

enabled_tasks = []

enabled_tasks.extend(generate_non_repo_domain_facade_tasks(logger))

if not RUNNING_DOCKER and machine_learning_phase.__name__ in enabled_phase_names:
#enabled_tasks.extend(machine_learning_phase())
from augur.tasks.data_analysis.contributor_breadth_worker.contributor_breadth_worker import contributor_breadth_model
Expand Down
5 changes: 4 additions & 1 deletion augur/tasks/util/worker_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ def parse_json_from_subprocess_call(logger, subprocess_arr, cwd=None):
output = p.stdout

try:
required_output = json.loads(output)
if output and output.strip():
required_output = json.loads(output)
else:
required_output = {}
except json.decoder.JSONDecodeError as e:
logger.error(f"Could not parse required output! \n output: {output} \n Error: {e}")
raise e
Expand Down

0 comments on commit c1b7a84

Please sign in to comment.