mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-20 05:03:35 +02:00
Removing couple of "buildins" polyglot types
This commit is contained in:
@@ -5,7 +5,7 @@ from ebook_converter.constants import isosx, isfrozen, filesystem_encoding, ispy
|
||||
from ebook_converter.utils.config import prefs
|
||||
from ebook_converter.ptempfile import PersistentTemporaryFile, base_dir
|
||||
from ebook_converter.utils.serialize import msgpack_dumps
|
||||
from ebook_converter.polyglot.builtins import iteritems, string_or_bytes, environ_item, native_string_type, getcwd
|
||||
from ebook_converter.polyglot.builtins import iteritems, environ_item, native_string_type, getcwd
|
||||
from ebook_converter.polyglot.binary import as_hex_unicode
|
||||
try:
|
||||
import win32process
|
||||
@@ -191,7 +191,7 @@ class Worker(object):
|
||||
_cwd = cwd
|
||||
if priority is None:
|
||||
priority = prefs['worker_process_priority']
|
||||
cmd = [exe] if isinstance(exe, string_or_bytes) else exe
|
||||
cmd = [exe] if isinstance(exe, (str, bytes)) else exe
|
||||
args = {
|
||||
'env' : env,
|
||||
'cwd' : _cwd,
|
||||
|
||||
@@ -8,7 +8,7 @@ from ebook_converter.utils.ipc import eintr_retry_call
|
||||
from ebook_converter.utils.ipc.launch import Worker
|
||||
from ebook_converter.utils.serialize import msgpack_loads, msgpack_dumps
|
||||
from ebook_converter.utils.monotonic import monotonic
|
||||
from ebook_converter.polyglot.builtins import string_or_bytes, environ_item
|
||||
from ebook_converter.polyglot.builtins import environ_item
|
||||
from ebook_converter.polyglot.binary import as_hex_unicode, from_hex_bytes
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ def start_pipe_worker(command, env=None, priority='normal', **process_args):
|
||||
args['close_fds'] = True
|
||||
|
||||
exe = w.executable
|
||||
cmd = [exe] if isinstance(exe, string_or_bytes) else exe
|
||||
cmd = [exe] if isinstance(exe, (str, bytes)) else exe
|
||||
p = subprocess.Popen(cmd + ['--pipe-worker', command], **args)
|
||||
return p
|
||||
|
||||
|
||||
Reference in New Issue
Block a user