1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-01-24 14:05:46 +01:00

Removed unsed code

This commit is contained in:
2020-07-17 17:57:41 +02:00
parent 4216fef20e
commit 5ac8451668
2 changed files with 1 additions and 18 deletions

View File

@@ -14,12 +14,11 @@ from ebook_converter.constants_old import islinux, isfrozen, \
isbsd, __appname__, __version__, __author__, \
config_dir
from ebook_converter.ebooks.html_entities import html5_entities
from ebook_converter.startup import winutil, winutilerror
if False:
# Prevent pyflakes from complaining
winutil, winutilerror, __appname__, islinux, __version__
__appname__, islinux, __version__
isfrozen, __author__
isbsd, config_dir

View File

@@ -13,25 +13,9 @@ builtins.__dict__['dynamic_property'] = lambda func: func(None)
_run_once = False
winutil = winutilerror = None
if not _run_once:
_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
from ebook_converter.ptempfile import base_dir