mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Fix byte-unicode issue when using Popen
This commit is contained in:
@@ -19,7 +19,10 @@ from galaxy import model, web
|
||||
from galaxy.containers import ContainerPort
|
||||
from galaxy.containers.docker_model import DockerVolume
|
||||
from galaxy.managers import api_keys
|
||||
from galaxy.util import string_as_bool_or_none
|
||||
from galaxy.util import (
|
||||
string_as_bool_or_none,
|
||||
unicodify
|
||||
)
|
||||
from galaxy.util.bunch import Bunch
|
||||
|
||||
|
||||
@@ -432,6 +435,8 @@ class InteractiveEnvironmentRequest(object):
|
||||
))
|
||||
p = Popen(raw_cmd, stdout=PIPE, stderr=PIPE, close_fds=True)
|
||||
stdout, stderr = p.communicate()
|
||||
stdout = unicodify(stdout)
|
||||
stderr = unicodify(stderr)
|
||||
if p.returncode != 0:
|
||||
log.error("Container Launch error\n\n%s\n%s" % (stdout, stderr))
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user