Skip to content

Commit

Permalink
handle weird chars in candidate output
Browse files Browse the repository at this point in the history
  • Loading branch information
agroce committed Feb 29, 2020
1 parent 51a48dd commit 089587c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/deepstate/executors/auxiliary/reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ def runCandidate(candidate):
cmd = [deepstate + " " + args.cmdArgs.replace("@@", candidate)]
exitCode = subprocess.call(cmd, shell=True, stdout=outf, stderr=outf)
result = []
with open(".reducer." + str(os.getpid()) + ".out", 'r') as inf:
with open(".reducer." + str(os.getpid()) + ".out", 'rb') as inf:
for line in inf:
result.append(line)
dline = line.decode("utf-8", "ignore")
result.append(dline)
return (result, exitCode)

def checks(resultAndExitCode):
Expand Down

0 comments on commit 089587c

Please sign in to comment.