mysociety / za-hansard

A parser for South African Hansards, as published at http://www.parliament.gov.za/live/content.php?Category_ID=119
Other
2 stars 3 forks source link

za_hansard_pmg_api_scraper cannot be run without --commit #70

Open duncanparkes opened 8 years ago

duncanparkes commented 8 years ago

If za_hansard_pmg_api_scraper is run without the --commit flag set, in order to check for sanity before running it properly, no sections are created, and consequently the script bails out with a "local variable 'section' referenced before assignment".

The whole thing should perhaps run in a transaction and then abort at the end if not committing rather than having lots of if self.commit` tests all over the place.