Commit 50a0c406 authored by Benjamin Bouvier's avatar Benjamin Bouvier
Browse files

Enhance support for Weboob 1.0;

parent ce6b7e14
...@@ -100,10 +100,10 @@ class Connector(object): ...@@ -100,10 +100,10 @@ class Connector(object):
"balance": unicode(account.balance), "balance": unicode(account.balance),
} }
if not empty(account.iban): if hasattr(account, 'iban') and not empty(account.iban):
acc["iban"] = unicode(account.iban) acc["iban"] = unicode(account.iban)
if not empty(account.currency): if hasattr(account, 'currency') and not empty(account.currency):
acc["currency"] = unicode(account.currency) acc["currency"] = unicode(account.currency)
results.append(acc) results.append(acc)
...@@ -125,9 +125,9 @@ class Connector(object): ...@@ -125,9 +125,9 @@ class Connector(object):
} }
# Handle missing information. # Handle missing information.
if not empty(line.rdate): if hasattr(line, 'rdate') and not empty(line.rdate):
op["date"] = line.rdate op["date"] = line.rdate
elif not empty(line.date): elif hasattr(line, 'date') and not empty(line.date):
op["date"] = line.date op["date"] = line.date
else: else:
# Wow, this should never happen. # Wow, this should never happen.
...@@ -135,7 +135,7 @@ class Connector(object): ...@@ -135,7 +135,7 @@ class Connector(object):
op["date"] = op["date"].strftime(DATETIME_FORMAT) op["date"] = op["date"].strftime(DATETIME_FORMAT)
if not empty(line.label): if hasattr(line, 'label') and not empty(line.label):
op["title"] = unicode(line.label) op["title"] = unicode(line.label)
else: else:
op["title"] = op["raw"] op["title"] = op["raw"]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment