Skip to content

Commit

Permalink
Use unicodify to deal with potential binary contents
Browse files Browse the repository at this point in the history
Fixes #346
  • Loading branch information
mvdbeek committed Nov 22, 2023
1 parent 99709bb commit 3c2ad51
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pulsar/manager_endpoint_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import logging
import os

from galaxy.util import unicodify

from pulsar import __version__ as pulsar_version
from pulsar.client.setup_handler import build_job_config
from pulsar.managers import (
Expand Down Expand Up @@ -36,10 +38,10 @@ def __job_complete_dict(complete_status, manager, job_id):
return_code = manager.return_code(job_id)
if return_code == PULSAR_UNKNOWN_RETURN_CODE:
return_code = None
stdout_contents = manager.stdout_contents(job_id).decode("utf-8")
stderr_contents = manager.stderr_contents(job_id).decode("utf-8")
job_stdout_contents = manager.job_stdout_contents(job_id).decode("utf-8")
job_stderr_contents = manager.job_stderr_contents(job_id).decode("utf-8")
stdout_contents = unicodify(manager.stdout_contents(job_id))
stderr_contents = unicodify(manager.stderr_contents(job_id))
job_stdout_contents = unicodify(manager.job_stdout_contents(job_id).decode("utf-8"))
job_stderr_contents = unicodify(manager.job_stderr_contents(job_id).decode("utf-8"))
job_directory = manager.job_directory(job_id)
as_dict = dict(
job_id=job_id,
Expand Down

0 comments on commit 3c2ad51

Please sign in to comment.