Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use unicodify to deal with potential binary contents #347

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading