display a warning when the password is expired and has been switched
This commit is contained in:
parent
481226c6d0
commit
25916abbcd
2 changed files with 3 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
|
||||
from weboob.tools.mech import ClientForm
|
||||
import sys
|
||||
import urllib
|
||||
from logging import error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue