Skip to content

Commit

Permalink
eregs#369: adding try/except to amendments getter
Browse files Browse the repository at this point in the history
  • Loading branch information
gregoryfoster committed May 24, 2017
1 parent b2a4c07 commit 2c89a54
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion regparser/notice/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,16 @@ def published(self, value):

@cached_property # rather expensive operation, so cache results
def amendments(self):
return fetch_amendments(self.xml)
"""Getter for relevent amendments.
:rtype: list of amendments
"""
try:
amendments = fetch_amendments(self.xml)
except:
logger.error('Unable to fetch amendments for docket %s', self.version_id)
return []
return amendments

@property
def fr_citation(self):
Expand Down

0 comments on commit 2c89a54

Please sign in to comment.