1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-01-26 07:05:45 +01:00

Removed unicode path function

This commit is contained in:
2020-07-13 20:21:26 +02:00
parent c82c4e456c
commit 6a7dc474ac
2 changed files with 1 additions and 9 deletions

View File

@@ -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'

View File

@@ -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