Skip to content

Commit

Permalink
Fixed "quite" bug - Issue #71 (#79)
Browse files Browse the repository at this point in the history
Issue #71
  • Loading branch information
MLpranav committed Feb 23, 2023
1 parent caa2c0b commit 5edc17b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/imgkit/imgkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ def to_img(self, path=None):
string = None
stdout, stderr = result.communicate(input=string)
stderr = stderr or stdout
stderr = stderr.decode("utf-8")
try:
stderr = stderr.decode("utf-8")
except UnicodeDecodeError:
stderr = ""
exit_code = result.returncode

if "cannot connect to X server" in stderr:
Expand Down

0 comments on commit 5edc17b

Please sign in to comment.