mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-19 04:33:34 +02:00
Removed unicode path function
This commit is contained in:
@@ -39,14 +39,6 @@ def guess_extension(*args, **kwargs):
|
|||||||
return ext
|
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):
|
def confirm_config_name(name):
|
||||||
return name + '_again'
|
return name + '_again'
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class HTMLFile(object):
|
|||||||
:param encoding: Use `encoding` to decode HTML.
|
:param encoding: Use `encoding` to decode HTML.
|
||||||
:param referrer: The :class:`HTMLFile` that first refers to this file.
|
: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.title = os.path.splitext(os.path.basename(self.path))[0]
|
||||||
self.base = os.path.dirname(self.path)
|
self.base = os.path.dirname(self.path)
|
||||||
self.level = level
|
self.level = level
|
||||||
|
|||||||
Reference in New Issue
Block a user