mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Only use bytes on python >= 3.11
This commit is contained in:
parent
b7fd0dde65
commit
2858397017
@ -107,7 +107,8 @@ def initialize_calibre():
|
||||
|
||||
def wrapped_orig_spawn_fds(args, passfds):
|
||||
# as of python 3.11 util.spawnv_passfds expects bytes args
|
||||
args = [x.encode('utf-8') if isinstance(x, str) else x for x in args]
|
||||
if sys.version_info >= (3, 11):
|
||||
args = [x.encode('utf-8') if isinstance(x, str) else x for x in args]
|
||||
return orig_spawn_passfds(args[0], args, passfds)
|
||||
|
||||
def spawnv_passfds(path, args, passfds):
|
||||
|
Loading…
x
Reference in New Issue
Block a user