mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
py3: misc fixes
This commit is contained in:
parent
6d5ce1c79a
commit
d9c22e7e1c
@ -1062,7 +1062,7 @@ OptionRecommendation(name='search_replace',
|
||||
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 @@ class HTMLFile(object):
|
||||
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…
x
Reference in New Issue
Block a user