1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-20 13:11:27 +02:00

Moved misc functions from polyglot package to single polyglot module.

This commit is contained in:
2021-05-25 19:06:31 +02:00
parent f46984267e
commit f47376830f
32 changed files with 244 additions and 219 deletions
+2 -2
View File
@@ -8,6 +8,7 @@ import tempfile
from ebook_converter.constants_old import __version__, __appname__, \
filesystem_encoding
from ebook_converter import polyglot
def cleanup(path):
@@ -90,9 +91,8 @@ def base_dir():
td = os.environ.get('CALIBRE_WORKER_TEMP_DIR', None)
if td is not None:
from ebook_converter.utils.serialize import msgpack_loads
from ebook_converter.polyglot.binary import from_hex_bytes
try:
td = msgpack_loads(from_hex_bytes(td))
td = msgpack_loads(polyglot.from_hex_bytes(td))
except Exception:
td = None
if td and os.path.exists(td):