mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -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):
|
if not os.path.exists(self.opts.debug_pipeline):
|
||||||
os.makedirs(self.opts.debug_pipeline)
|
os.makedirs(self.opts.debug_pipeline)
|
||||||
open(os.path.join(self.opts.debug_pipeline, 'README.txt'),
|
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'):
|
for x in ('input', 'parsed', 'structure', 'processed'):
|
||||||
x = os.path.join(self.opts.debug_pipeline, x)
|
x = os.path.join(self.opts.debug_pipeline, x)
|
||||||
if os.path.exists(x):
|
if os.path.exists(x):
|
||||||
|
@ -145,6 +145,9 @@ class HTMLFile(object):
|
|||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return self.path == getattr(other, 'path', other)
|
return self.path == getattr(other, 'path', other)
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return hash(self.path)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return u'HTMLFile:%d:%s:%s'%(self.level, 'b' if self.is_binary else 'a', self.path)
|
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