Raise exception instances, not classes
This commit is contained in:
parent
0fa7060b68
commit
32b0895ea6
3 changed files with 6 additions and 6 deletions
|
|
@ -107,9 +107,9 @@ class CmbBackend(BaseBackend, ICapBank):
|
|||
tree = etree.parse(StringIO(data), parser)
|
||||
table = tree.xpath('/html/body/table')
|
||||
if len(table) == 0:
|
||||
raise BrokenPageError
|
||||
raise BrokenPageError()
|
||||
else:
|
||||
raise BrokenPageError
|
||||
raise BrokenPageError()
|
||||
|
||||
for tr in table[1].getiterator('tr'):
|
||||
if tr.get('class') != 'LnTit' and tr.get('class') != 'LnTot':
|
||||
|
|
@ -189,9 +189,9 @@ class CmbBackend(BaseBackend, ICapBank):
|
|||
tree = etree.parse(StringIO(data), parser)
|
||||
tables = tree.xpath('/html/body/table')
|
||||
if len(tables) == 0:
|
||||
raise BrokenPageError
|
||||
raise BrokenPageError()
|
||||
else:
|
||||
raise BrokenPageError
|
||||
raise BrokenPageError()
|
||||
|
||||
i = 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue