Commit 5a8411fb authored by Nicolas Gattolin's avatar Nicolas Gattolin Committed by Romain Bignon

[bnporc] py3 port

- import unicode_literals in each Python module
- import weboob's basestring compat
- xrange -> range
- tested on 90 connections, 1 for each API
parent 8444c044
......@@ -17,11 +17,14 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from datetime import date, timedelta
from weboob.browser import LoginBrowser, URL, need_login
from weboob.capabilities.base import find_object
from weboob.capabilities.bank import AccountNotFound
from weboob.tools.compat import basestring
from .pages import LoginPage, AccountsPage, HistoryPage
......
......@@ -17,6 +17,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from io import BytesIO
import hashlib
from decimal import Decimal
......
......@@ -17,6 +17,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import re
from datetime import datetime
......
......@@ -17,6 +17,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import re
from datetime import datetime
......
......@@ -17,6 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import re
from decimal import Decimal
......
......@@ -17,6 +17,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from collections import Counter
import re
from io import BytesIO
......@@ -157,7 +159,7 @@ class LoginPage(JsonPage):
@staticmethod
def generate_token(length=11):
chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'
return ''.join((chars[randint(0, len(chars)-1)] for _ in xrange(length)))
return ''.join((chars[randint(0, len(chars)-1)] for _ in range(length)))
def build_doc(self, text):
try:
......
......@@ -25,6 +25,7 @@ binck
biplan
blablacar
blogspot
bnporc
bnppere
boursorama
bp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment