Skip to content

Commit

Permalink
Decode error message so that it is printed correctly (#27)
Browse files Browse the repository at this point in the history
* Decode error message so that it is printed correctly

* CI fix
  • Loading branch information
abmyii authored Sep 8, 2021
1 parent dd401d3 commit a0c7604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doltcli/dolt.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _execute(args: List[str], cwd: Optional[str] = None, outfile: Optional[str]
proc = Popen(args=_args, cwd=cwd, stdout=f, stderr=PIPE)
else:
proc = Popen(args=_args, cwd=cwd, stdout=PIPE, stderr=PIPE)
out, err = proc.communicate()
out, err = (val.decode("utf8") if val else "" for val in proc.communicate())
exitcode = proc.returncode

if exitcode != 0:
Expand All @@ -87,7 +87,7 @@ def _execute(args: List[str], cwd: Optional[str] = None, outfile: Optional[str]
if outfile:
return outfile
else:
return out.decode("utf-8")
return out


class Status(StatusT):
Expand Down

0 comments on commit a0c7604

Please sign in to comment.