Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
177
Issues
177
List
Boards
Labels
Milestones
Merge Requests
49
Merge Requests
49
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
3f2ccc8a
Commit
3f2ccc8a
authored
Apr 09, 2018
by
Vincent Ardisson
Committed by
Romain Bignon
Jul 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[barclays] don't cache history
It's useless and less readable
parent
50e1c1b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
modules/barclays/browser.py
modules/barclays/browser.py
+23
-23
No files found.
modules/barclays/browser.py
View file @
3f2ccc8a
...
...
@@ -156,36 +156,36 @@ class Barclays(LoginBrowser):
elif
account
.
type
==
Account
.
TYPE_LOAN
:
return
[]
if
account
.
id
not
in
self
.
cache
[
'history'
]:
self
.
_go_to_account
(
account
)
if
account
.
type
in
(
Account
.
TYPE_LIFE_INSURANCE
,
Account
.
TYPE_MARKET
):
if
not
self
.
_go_to_account_space
(
'Mouvements'
,
account
):
self
.
logger
.
warning
(
'cannot go to history page for
%
r'
,
account
)
return
[]
self
.
_go_to_account
(
account
)
history_page
=
self
.
page
if
account
.
type
in
(
Account
.
TYPE_LIFE_INSURANCE
,
Account
.
TYPE_MARKET
):
if
not
self
.
_go_to_account_space
(
'Mouvements'
,
account
):
self
.
logger
.
warning
(
'cannot go to history page for
%
r'
,
account
)
return
[]
if
account
.
type
!=
Account
.
TYPE_LIFE_INSURANCE
:
for
_
in
range
(
100
):
# on new history page they take previous results too, so go to the last page before starts recover history
form
=
history_page
.
form_to_history_page
()
history_page
=
self
.
page
if
not
form
:
break
if
account
.
type
!=
Account
.
TYPE_LIFE_INSURANCE
:
for
_
in
range
(
100
):
# on new history page they take previous results too, so go to the last page before starts recover history
form
=
history_page
.
form_to_history_page
()
try
:
history_page
=
self
.
account
.
open
(
data
=
form
)
except
ConnectionError
:
# Sometime accounts have too much history and website crash
# Need to relogin
self
.
_relogin
()
if
not
form
:
break
break
else
:
assert
False
,
"Too many iterations"
try
:
history_page
=
self
.
account
.
open
(
data
=
form
)
except
ConnectionError
:
# Sometime accounts have too much history and website crash
# Need to relogin
self
.
_relogin
()
self
.
cache
[
'history'
][
account
.
id
]
=
list
(
history_page
.
iter_history
())
if
history_page
.
has_history
()
else
[]
break
else
:
assert
False
,
"Too many iterations"
return
self
.
cache
[
'history'
][
account
.
id
]
if
history_page
.
has_history
():
return
list
(
history_page
.
iter_history
())
else
:
return
[]
@
need_login
def
iter_coming
(
self
,
account
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment