mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-25 16:01:29 +02:00
Removed unsed code
This commit is contained in:
@@ -14,12 +14,11 @@ from ebook_converter.constants_old import islinux, isfrozen, \
|
|||||||
isbsd, __appname__, __version__, __author__, \
|
isbsd, __appname__, __version__, __author__, \
|
||||||
config_dir
|
config_dir
|
||||||
from ebook_converter.ebooks.html_entities import html5_entities
|
from ebook_converter.ebooks.html_entities import html5_entities
|
||||||
from ebook_converter.startup import winutil, winutilerror
|
|
||||||
|
|
||||||
|
|
||||||
if False:
|
if False:
|
||||||
# Prevent pyflakes from complaining
|
# Prevent pyflakes from complaining
|
||||||
winutil, winutilerror, __appname__, islinux, __version__
|
__appname__, islinux, __version__
|
||||||
isfrozen, __author__
|
isfrozen, __author__
|
||||||
isbsd, config_dir
|
isbsd, config_dir
|
||||||
|
|
||||||
|
|||||||
@@ -13,25 +13,9 @@ builtins.__dict__['dynamic_property'] = lambda func: func(None)
|
|||||||
|
|
||||||
|
|
||||||
_run_once = False
|
_run_once = False
|
||||||
winutil = winutilerror = None
|
|
||||||
|
|
||||||
if not _run_once:
|
if not _run_once:
|
||||||
_run_once = True
|
_run_once = True
|
||||||
from importlib import import_module
|
|
||||||
|
|
||||||
class DeVendor(object):
|
|
||||||
|
|
||||||
def find_spec(self, fullname, path, target=None):
|
|
||||||
spec = None
|
|
||||||
if fullname == 'calibre.web.feeds.feedparser':
|
|
||||||
m = import_module('feedparser')
|
|
||||||
spec = m.__spec__
|
|
||||||
elif fullname.startswith('calibre.ebooks.markdown'):
|
|
||||||
m = import_module(fullname[len('calibre.ebooks.'):])
|
|
||||||
spec = m.__spec__
|
|
||||||
return spec
|
|
||||||
|
|
||||||
sys.meta_path.insert(0, DeVendor())
|
|
||||||
|
|
||||||
# Ensure that all temp files/dirs are created under a calibre tmp dir
|
# Ensure that all temp files/dirs are created under a calibre tmp dir
|
||||||
from ebook_converter.ptempfile import base_dir
|
from ebook_converter.ptempfile import base_dir
|
||||||
|
|||||||
Reference in New Issue
Block a user