Permalink
Browse files

Ignore errors and continue downloading.

  • Loading branch information...
1 parent 6ab7034 commit f73d79d65d7aa59f9368b89f0548ad22358e3b0a @anandology committed Aug 24, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 electionarchive/crawlers/AE_2011_WB.py
@@ -233,7 +233,10 @@ def _download_expenditures_for_ac(self, id):
for link in post_links:
suffix = self.get_suffix_from_jslink(link['href'], suffix_map={"CR": "abstract", "SC": "affidavit"})
target = link['href'].split("'")[1]
- self._download_expenditure(id, suffix, formdata, target)
+ try:
+ self._download_expenditure(id, suffix, formdata, target)
+ except IOError:
+ logger.error("Downloading expediture failed", exc_info=True)
@disk_memoize("files/expediture/%(id)s-%(suffix)s.pdf")
def _download_expenditure(self, id, suffix, formdata, target):

0 comments on commit f73d79d

Please sign in to comment.