mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1020 (Errors occuring during multiple add should not interrupt the process)
This commit is contained in:
parent
c66ea072e9
commit
fd90212e27
@ -507,14 +507,17 @@ in which you want to store your books files. Any existing books will be automati
|
||||
format = os.path.splitext(book)[1]
|
||||
format = format[1:] if format else None
|
||||
stream = open(book, 'rb')
|
||||
try:
|
||||
mi = get_metadata(stream, stream_type=format, use_libprs_metadata=True)
|
||||
except:
|
||||
mi = MetaInformation(None, None)
|
||||
if not mi.title:
|
||||
mi.title = os.path.splitext(os.path.basename(book))[0]
|
||||
if not mi.authors:
|
||||
mi.authors = [_('Unknown')]
|
||||
formats.append(format)
|
||||
metadata.append(mi)
|
||||
names.append(os.path.basename(book))
|
||||
if not mi.authors:
|
||||
mi.authors = ['Unknown']
|
||||
infos.append({'title':mi.title, 'authors':', '.join(mi.authors),
|
||||
'cover':self.default_thumbnail, 'tags':[]})
|
||||
|
||||
@ -524,7 +527,11 @@ in which you want to store your books files. Any existing books will be automati
|
||||
paths = list(paths)
|
||||
for i, path in enumerate(paths):
|
||||
if html_pat.search(path) is not None:
|
||||
try:
|
||||
paths[i] = html2oeb(path)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
continue
|
||||
if paths[i] is None:
|
||||
paths[i] = path
|
||||
else:
|
||||
|
@ -45,7 +45,7 @@ class cmd_commit(_cmd_commit):
|
||||
password = config.get_user_option(prefix+'password')
|
||||
close_bug = config.get_user_option(prefix+'pattern')
|
||||
if close_bug is None:
|
||||
close_bug = r'(Fix|Implement)\s+#(\d+)'
|
||||
close_bug = r'(Fix|Implement|Fixes|Fixed|Implemented)\s+#(\d+)'
|
||||
close_bug_pat = re.compile(close_bug, re.IGNORECASE)
|
||||
match = close_bug_pat.search(msg)
|
||||
if not match:
|
||||
|
Loading…
x
Reference in New Issue
Block a user