Skip to content
This repository was archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
ExternalErtScript: Explicit bytes -> str conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkwah committed Jan 14, 2020
1 parent 33aa63b commit c9de14e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/res/job_queue/external_ert_script.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import codecs
import sys
from subprocess import Popen, PIPE
from res.job_queue import ErtScript
Expand All @@ -22,6 +23,9 @@ def run(self, *args):
# The job will complete before stdout and stderr is returned
self._stdoutdata, self._stderrdata = self.__job.communicate()

self._stdoutdata = codecs.decode(self._stdoutdata, "utf8", "replace")
self._stderrdata = codecs.decode(self._stderrdata, "utf8", "replace")

sys.stdout.write(self._stdoutdata)

if self.__job.returncode != 0:
Expand Down

0 comments on commit c9de14e

Please sign in to comment.