Fix: do not crash if balance is notavailable

This commit is contained in:
Florent 2014-06-02 13:53:46 +02:00
commit 148089329d
3 changed files with 14 additions and 15 deletions

View file

@ -18,7 +18,6 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.capabilities.bill import ICapBill, SubscriptionNotFound,\
BillNotFound, Subscription, Bill
from weboob.tools.backend import BaseBackend, BackendConfig
@ -67,7 +66,8 @@ class LeclercMobileBackend(BaseBackend, ICapBill):
def iter_bills_history(self, subscription):
with self.browser:
for history in self.browser.get_history():
yield history
if history.label != "Votre solde":
yield history
def get_bill(self, id):
with self.browser: