pyflakes fixes

This commit is contained in:
Romain Bignon 2011-12-04 12:02:44 +01:00
commit 3a02f12bdb
5 changed files with 11 additions and 19 deletions

View file

@ -363,7 +363,7 @@ class AuMBrowser(BaseBrowser):
url = '%simage1.jpg' % base_url
try:
self.openurl(url)
except BrowserHTTPNotFound, e:
except BrowserHTTPNotFound:
pass
else:
profile['pictures'].append({'url': url, u'hidden': True, 'id': u'0', 'rating': 0.0})

View file

@ -25,7 +25,8 @@ from weboob.backends.boursorama import pages
from datetime import date
from dateutil.relativedelta import relativedelta
__all__ = ['boursorama']
__all__ = ['Boursorama']
class Boursorama(BaseBrowser):

View file

@ -19,14 +19,10 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
import re
from datetime import date
from weboob.tools.misc import to_unicode
from weboob.tools.browser import BasePage
from weboob.capabilities.bank import Operation
from weboob.capabilities.base import NotAvailable
__all__ = ['AccountHistory']
@ -53,16 +49,16 @@ class AccountHistory(BasePage):
category = labeldiv.attrib.get('title', '')
useless, sep, category = [part.strip() for part in category.partition(':')]
amount = tds[3].text
if amount == None:
amount = tds[4].text
amount = amount.strip(u' \n\t\x80').replace(' ', '').replace(',', '.')
# if we don't have exactly one '.', this is not a floatm try the next
operation = Operation(len(self.operations))
operation.amount = float(amount)
operation.date = d
operation.label = label
operation.category = category

View file

@ -19,8 +19,6 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
import re
from weboob.capabilities.bank import Account
from weboob.tools.browser import BasePage
@ -38,17 +36,17 @@ class AccountsList(BasePage):
for td in tr.getiterator('td'):
if td.attrib.get('class', '') == 'account-cb':
break
elif td.attrib.get('class', '') == 'account-name':
a = td.find('a')
account.label = a.text
account.link_id = a.get('href', '')
elif td.attrib.get('class', '') == 'account-number':
id = td.text
id = id.strip(u' \n\t')
account.id = id
elif td.attrib.get('class', '') == 'account-total':
span = td.find('span')
if span == None:
@ -60,7 +58,7 @@ class AccountsList(BasePage):
account.balance = float(balance)
else:
account.balance = 0.0
else:
# because of some weird useless <tr>
if account.id != 0:

View file

@ -18,10 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from logging import error
from weboob.tools.browser import BasePage, BrowserUnavailable
from lxml import etree
from weboob.tools.browser import BasePage
__all__ = ['LoginPage']