pyflakes fixes
This commit is contained in:
parent
c5e68a2c44
commit
3a02f12bdb
5 changed files with 11 additions and 19 deletions
|
|
@ -363,7 +363,7 @@ class AuMBrowser(BaseBrowser):
|
||||||
url = '%simage1.jpg' % base_url
|
url = '%simage1.jpg' % base_url
|
||||||
try:
|
try:
|
||||||
self.openurl(url)
|
self.openurl(url)
|
||||||
except BrowserHTTPNotFound, e:
|
except BrowserHTTPNotFound:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
profile['pictures'].append({'url': url, u'hidden': True, 'id': u'0', 'rating': 0.0})
|
profile['pictures'].append({'url': url, u'hidden': True, 'id': u'0', 'rating': 0.0})
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ from weboob.backends.boursorama import pages
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
|
|
||||||
__all__ = ['boursorama']
|
|
||||||
|
__all__ = ['Boursorama']
|
||||||
|
|
||||||
|
|
||||||
class Boursorama(BaseBrowser):
|
class Boursorama(BaseBrowser):
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,10 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import re
|
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
from weboob.tools.misc import to_unicode
|
|
||||||
|
|
||||||
from weboob.tools.browser import BasePage
|
from weboob.tools.browser import BasePage
|
||||||
from weboob.capabilities.bank import Operation
|
from weboob.capabilities.bank import Operation
|
||||||
from weboob.capabilities.base import NotAvailable
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['AccountHistory']
|
__all__ = ['AccountHistory']
|
||||||
|
|
@ -53,16 +49,16 @@ class AccountHistory(BasePage):
|
||||||
|
|
||||||
category = labeldiv.attrib.get('title', '')
|
category = labeldiv.attrib.get('title', '')
|
||||||
useless, sep, category = [part.strip() for part in category.partition(':')]
|
useless, sep, category = [part.strip() for part in category.partition(':')]
|
||||||
|
|
||||||
amount = tds[3].text
|
amount = tds[3].text
|
||||||
if amount == None:
|
if amount == None:
|
||||||
amount = tds[4].text
|
amount = tds[4].text
|
||||||
amount = amount.strip(u' \n\t\x80').replace(' ', '').replace(',', '.')
|
amount = amount.strip(u' \n\t\x80').replace(' ', '').replace(',', '.')
|
||||||
|
|
||||||
# if we don't have exactly one '.', this is not a floatm try the next
|
# if we don't have exactly one '.', this is not a floatm try the next
|
||||||
operation = Operation(len(self.operations))
|
operation = Operation(len(self.operations))
|
||||||
operation.amount = float(amount)
|
operation.amount = float(amount)
|
||||||
|
|
||||||
operation.date = d
|
operation.date = d
|
||||||
operation.label = label
|
operation.label = label
|
||||||
operation.category = category
|
operation.category = category
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,6 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
from weboob.capabilities.bank import Account
|
from weboob.capabilities.bank import Account
|
||||||
from weboob.tools.browser import BasePage
|
from weboob.tools.browser import BasePage
|
||||||
|
|
||||||
|
|
@ -38,17 +36,17 @@ class AccountsList(BasePage):
|
||||||
for td in tr.getiterator('td'):
|
for td in tr.getiterator('td'):
|
||||||
if td.attrib.get('class', '') == 'account-cb':
|
if td.attrib.get('class', '') == 'account-cb':
|
||||||
break
|
break
|
||||||
|
|
||||||
elif td.attrib.get('class', '') == 'account-name':
|
elif td.attrib.get('class', '') == 'account-name':
|
||||||
a = td.find('a')
|
a = td.find('a')
|
||||||
account.label = a.text
|
account.label = a.text
|
||||||
account.link_id = a.get('href', '')
|
account.link_id = a.get('href', '')
|
||||||
|
|
||||||
elif td.attrib.get('class', '') == 'account-number':
|
elif td.attrib.get('class', '') == 'account-number':
|
||||||
id = td.text
|
id = td.text
|
||||||
id = id.strip(u' \n\t')
|
id = id.strip(u' \n\t')
|
||||||
account.id = id
|
account.id = id
|
||||||
|
|
||||||
elif td.attrib.get('class', '') == 'account-total':
|
elif td.attrib.get('class', '') == 'account-total':
|
||||||
span = td.find('span')
|
span = td.find('span')
|
||||||
if span == None:
|
if span == None:
|
||||||
|
|
@ -60,7 +58,7 @@ class AccountsList(BasePage):
|
||||||
account.balance = float(balance)
|
account.balance = float(balance)
|
||||||
else:
|
else:
|
||||||
account.balance = 0.0
|
account.balance = 0.0
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# because of some weird useless <tr>
|
# because of some weird useless <tr>
|
||||||
if account.id != 0:
|
if account.id != 0:
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from logging import error
|
from weboob.tools.browser import BasePage
|
||||||
|
|
||||||
from weboob.tools.browser import BasePage, BrowserUnavailable
|
|
||||||
from lxml import etree
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['LoginPage']
|
__all__ = ['LoginPage']
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue