File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 4343
4444from PyQt5 import QtCore , QtGui
4545from lector import database
46-
47- from lector .parsers .epub import ParseEPUB
48- from lector .parsers .mobi import ParseMOBI
49- from lector .parsers .fb2 import ParseFB2
5046from lector .parsers .comicbooks import ParseCOMIC
5147
5248logger = logging .getLogger (__name__ )
6965# python-lxml - Required for everything except comics
7066lxml_check = importlib .util .find_spec ('lxml' )
7167xmltodict_check = importlib .util .find_spec ('xmltodict' )
72- if lxml_check :
68+ if lxml_check and xmltodict_check :
69+ from lector .parsers .epub import ParseEPUB
70+ from lector .parsers .mobi import ParseMOBI
71+ from lector .parsers .fb2 import ParseFB2
72+
7373 lxml_dependent = {
7474 'epub' : ParseEPUB ,
7575 'mobi' : ParseMOBI ,
8181 'fb2.zip' : ParseFB2 }
8282 sorter .update (lxml_dependent )
8383else :
84- critical_sting = 'python- lxml / xmltodict is not installed. Only comics will load.'
84+ critical_sting = 'lxml / xmltodict is not installed. Only comics will load.'
8585 print (critical_sting )
8686 logger .critical (critical_sting )
8787
You can’t perform that action at this time.
0 commit comments