From c943f648a51155833e7c022fa0db2750e2bfe181 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Wed, 20 Feb 2019 15:29:38 +0100 Subject: [PATCH] [cmes/cices] Re-order arguments in the browser instanciation The arguments were not in the same order in the module.py of CMES and in the browser __init of cmes and its children modules. CMES has several children, including CICES. --- modules/cices/module.py | 10 ++++++---- modules/cmes/browser.py | 3 +-- modules/cmes/module.py | 6 +++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/cices/module.py b/modules/cices/module.py index 409743bd23..c589ca27ca 100644 --- a/modules/cices/module.py +++ b/modules/cices/module.py @@ -43,10 +43,12 @@ class CicesModule(Module, CapBankPockets): BROWSER = CmesBrowser def create_default_browser(self): - return self.create_browser('https://www.cic-epargnesalariale.fr', - self.config['login'].get(), - self.config['password'].get(), - weboob=self.weboob) + return self.create_browser( + self.config['login'].get(), + self.config['password'].get(), + 'https://www.cic-epargnesalariale.fr', + weboob=self.weboob + ) def get_account(self, _id): return find_object(self.browser.iter_accounts(), id=_id, error=AccountNotFound) diff --git a/modules/cmes/browser.py b/modules/cmes/browser.py index 77a69cbfb1..464159e9e2 100644 --- a/modules/cmes/browser.py +++ b/modules/cmes/browser.py @@ -42,8 +42,7 @@ class CmesBrowser(LoginBrowser): '(?P.*)fr/.*GoOperationDetails', HistoryPage) custom_page = URL('/fr/espace/personnel/index.html', CustomPage) - - def __init__(self, website, username, password, subsite="", *args, **kwargs): + def __init__(self, username, password, website, subsite="", *args, **kwargs): super(LoginBrowser, self).__init__(*args, **kwargs) self.BASEURL = website self.username = username diff --git a/modules/cmes/module.py b/modules/cmes/module.py index 29572c839a..ba2bcbf134 100644 --- a/modules/cmes/module.py +++ b/modules/cmes/module.py @@ -43,7 +43,11 @@ class CmesModule(Module, CapBankPockets): BROWSER = CmesBrowser def create_default_browser(self): - return self.create_browser('https://www.creditmutuel-epargnesalariale.fr', self.config['login'].get(), self.config['password'].get()) + return self.create_browser( + self.config['login'].get(), + self.config['password'].get(), + 'https://www.creditmutuel-epargnesalariale.fr', + ) def get_account(self, _id): return find_object(self.browser.iter_accounts(), id=_id, error=AccountNotFound) -- GitLab