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.
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.