SHOW:
|
|
- or go back to the newest paste.
1 | class GeoParserPass(Pass): | |
2 | def run_with_processor(self, books, reporter, processor): | |
3 | def _parse(book, para, chart_corr, notice): | |
4 | - | notice.geos = [processor.parse_meta_geo(geo) for geo in notice.ast_object.action_geo] |
4 | + | mgeos = [] |
5 | exc = None | |
6 | for geo in notice.ast_object.action_geo: | |
7 | try: | |
8 | mgeos.append(processor.parse_meta_geo(geo)) | |
9 | except Exception as e: | |
10 | exc = e | |
11 | notice.geos.extend(mgeos) | |
12 | if exc: | |
13 | raise exc | |
14 | base_passes.for_each(_parse, books.walk("books").walk("paras").walk("chart_corrections").walk("notices") |