From 6a7dc474ac6a06f6fe4148285450a8436d6c5a60 Mon Sep 17 00:00:00 2001 From: gryf Date: Mon, 13 Jul 2020 20:21:26 +0200 Subject: [PATCH] Removed unicode path function --- ebook_converter/__init__.py | 8 -------- ebook_converter/ebooks/html/input.py | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ebook_converter/__init__.py b/ebook_converter/__init__.py index 2796284..2cf1f20 100644 --- a/ebook_converter/__init__.py +++ b/ebook_converter/__init__.py @@ -39,14 +39,6 @@ def guess_extension(*args, **kwargs): return ext -def unicode_path(path, abs=False): - if isinstance(path, bytes): - path = path.decode(constants_old.filesystem_encoding) - if abs: - path = os.path.abspath(path) - return path - - def confirm_config_name(name): return name + '_again' diff --git a/ebook_converter/ebooks/html/input.py b/ebook_converter/ebooks/html/input.py index 7c4562c..cb75c67 100644 --- a/ebook_converter/ebooks/html/input.py +++ b/ebook_converter/ebooks/html/input.py @@ -88,7 +88,7 @@ class HTMLFile(object): :param encoding: Use `encoding` to decode HTML. :param referrer: The :class:`HTMLFile` that first refers to this file. """ - self.path = unicode_path(path_to_html_file, abs=True) + self.path = os.path.abspath(path_to_html_file) self.title = os.path.splitext(os.path.basename(self.path))[0] self.base = os.path.dirname(self.path) self.level = level