mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-25 11:55:54 +01:00
py3: misc fixes
This commit is contained in:
parent
6d5ce1c79a
commit
d9c22e7e1c
2 changed files with 4 additions and 1 deletions
|
|
@ -1062,7 +1062,7 @@ def run(self):
|
|||
if not os.path.exists(self.opts.debug_pipeline):
|
||||
os.makedirs(self.opts.debug_pipeline)
|
||||
open(os.path.join(self.opts.debug_pipeline, 'README.txt'),
|
||||
'w').write(DEBUG_README.encode('utf-8'))
|
||||
'wb').write(DEBUG_README.encode('utf-8'))
|
||||
for x in ('input', 'parsed', 'structure', 'processed'):
|
||||
x = os.path.join(self.opts.debug_pipeline, x)
|
||||
if os.path.exists(x):
|
||||
|
|
|
|||
|
|
@ -145,6 +145,9 @@ def __init__(self, path_to_html_file, level, encoding, verbose, referrer=None):
|
|||
def __eq__(self, other):
|
||||
return self.path == getattr(other, 'path', other)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.path)
|
||||
|
||||
def __str__(self):
|
||||
return u'HTMLFile:%d:%s:%s'%(self.level, 'b' if self.is_binary else 'a', self.path)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue