mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
26ad1042a0
commit
6c04e010a5
@ -40,6 +40,7 @@ class CHMError(Exception):
|
||||
pass
|
||||
|
||||
class CHMReader(CHMFile):
|
||||
|
||||
def __init__(self, input, log, input_encoding=None):
|
||||
CHMFile.__init__(self)
|
||||
if isinstance(input, unicode):
|
||||
@ -83,7 +84,6 @@ class CHMReader(CHMFile):
|
||||
# print toc
|
||||
return toc
|
||||
|
||||
|
||||
def GetFile(self, path):
|
||||
# have to have abs paths for ResolveObject, but Contents() deliberately
|
||||
# makes them relative. So we don't have to worry, re-add the leading /.
|
||||
@ -226,7 +226,8 @@ class CHMReader(CHMFile):
|
||||
if os.path.exists(ipath):
|
||||
continue
|
||||
src = src.split(';')[0]
|
||||
if not src: continue
|
||||
if not src:
|
||||
continue
|
||||
ipath = os.path.join(base, *src.split('/'))
|
||||
if not os.path.exists(ipath):
|
||||
while src.startswith('../'):
|
||||
@ -277,6 +278,3 @@ class CHMReader(CHMFile):
|
||||
|
||||
def extract_content(self, output_dir=os.getcwdu(), debug_dump=False):
|
||||
self.ExtractFiles(output_dir=output_dir, debug_dump=debug_dump)
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user