return
if namespace:
return
- return WL_ELEMENTS[name]
+ try:
+ return WL_ELEMENTS[name]
+ except KeyError:
+ return
parser = etree.XMLParser()
else:
data['parts'].append((part, part.get_statistics()))
for k, v in data['parts'][-1][1]['total'].items():
- data['total'][k] += v
+ data['total'][k] = data['total'].get(k, 0) + v
return data
for part_uri in self.book_info.parts:
try:
yield self.from_file(
- self.provider.by_uri(part_uri), provider=self.provider
+ self.provider.by_slug(part_uri.slug), provider=self.provider
)
except Exception as e:
if pass_part_errors: