Skip to content

Commit

Permalink
open subprocess's stderr in text mode
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyzz committed Dec 7, 2021
1 parent 14555f3 commit c7200b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
from calibre.customize import InterfaceActionBase

VERSION = (3, 14, 3)
VERSION = (3, 14, 4)


class WordDumbDumb(InterfaceActionBase):
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def job_failed(self, job):
return False

def subprocess_error(self, job):
exception = job.exception.stderr.decode('utf-8')
exception = job.exception.stderr
if 'C++ Build Tools' in exception:
self.error_dialog(
'Seriously, 32bit?!',
Expand Down
4 changes: 2 additions & 2 deletions unzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def pip_install(pkg, pkg_version, compiled=False, url=None,
notif.put((0, f'Installing {pkg}'))
args = pip_args(pkg, pkg_version, compiled, url)
if iswindows:
subprocess.run(args, check=True, capture_output=True,
subprocess.run(args, check=True, capture_output=True, text=True,
creationflags=subprocess.CREATE_NO_WINDOW)
else:
subprocess.run(args, check=True, capture_output=True)
subprocess.run(args, check=True, capture_output=True, text=True)


def pip_args(pkg, pkg_version, compiled, url):
Expand Down

0 comments on commit c7200b1

Please sign in to comment.