display a warning when the password is expired and has been switched

This commit is contained in:
Romain Bignon 2010-10-03 15:39:07 +02:00
commit 25916abbcd
2 changed files with 3 additions and 1 deletions

View file

@ -16,6 +16,8 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from logging import warning
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
from weboob.backends.bnporc import pages
from .errors import PasswordExpired
@ -86,6 +88,7 @@ class BNPorc(BaseBrowser):
return func(self, *args, **kwargs)
except PasswordExpired:
if self.rotating_password is not None:
warning('[%s] Your password has expired. Switching...' % self.username)
self.change_password(self.rotating_password)
return func(self, *args, **kwargs)
else:

View file

@ -17,7 +17,6 @@
from weboob.tools.mech import ClientForm
import sys
import urllib
from logging import error