Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GeoParserPass(Pass):
- def run_with_processor(self, books, reporter, processor):
- def _parse(book, para, chart_corr, notice):
- mgeos = []
- exc = None
- for geo in notice.ast_object.action_geo:
- try:
- mgeos.append(processor.parse_meta_geo(geo))
- except Exception as e:
- exc = e
- notice.geos.extend(mgeos)
- if exc:
- raise exc
- base_passes.for_each(_parse, books.walk("books").walk("paras").walk("chart_corrections").walk("notices")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement