Commit 43d09e91 authored by Romain Bignon's avatar Romain Bignon Committed by ntome

stable_backport: reset manual ports

parent 20f88240
......@@ -43,13 +43,6 @@ def create_compat_dir(name):
MANUAL_PORTS = [
'weboob.capabilities.bank',
'weboob.capabilities.housing',
'weboob.capabilities.recipe',
'weboob.browser.pages',
'weboob.browser.exceptions',
'weboob.exceptions',
'weboob.browser.filters.html',
]
MANUAL_PORT_DIR = path.join(path.dirname(__file__), 'stable_backport_data')
......@@ -211,9 +204,6 @@ class StableBackport(object):
error.fixup()
system('git add %s' % compat_dirname)
with log('Custom fixups'):
replace_all("from weboob.browser.exceptions import LoggedOut", "from .weboob_browser_exceptions import LoggedOut")
system('git add -u')
......
from weboob.browser.exceptions import *
class LoggedOut(Exception):
pass
from weboob.browser.filters.html import *
from weboob.browser.filters.standard import ColumnNotFound
from weboob.browser.pages import *
from .weboob_browser_exceptions import LoggedOut
class LoginPage(object):
def on_load(self):
if not self.browser.logging_in:
raise LoggedOut()
super(LoginPage, self).on_load()
import weboob.capabilities.bank as OLD
# can't import *, __all__ is incomplete...
for attr in dir(OLD):
globals()[attr] = getattr(OLD, attr)
__all__ = OLD.__all__
class CapBankWealth(CapBank):
pass
class CapBankPockets(CapBank):
pass
class Rate(BaseObject, Currency):
pass
class CapCurrencyRate(CapBank):
pass
class CapBankTransfer(OLD.CapBankTransfer):
def transfer_check_label(self, old, new):
from unidecode import unidecode
return unidecode(old) == unidecode(new)
class CapBankTransferAddRecipient(CapBankTransfer, OLD.CapBankTransferAddRecipient):
pass
Account.TYPE_MORTGAGE = 17
Account.TYPE_CONSUMER_CREDIT = 18
Account.TYPE_REVOLVING_CREDIT = 19
import weboob.capabilities.housing as OLD
# can't import *, __all__ is incomplete...
for attr in dir(OLD):
globals()[attr] = getattr(OLD, attr)
__all__ = OLD.__all__
ENERGY_CLASS = enum(A=u'A', B=u'B', C=u'C', D=u'D', E=u'E', F=u'F', G=u'G')
POSTS_TYPES = enum(RENT=u'RENT',
SALE=u'SALE',
SHARING=u'SHARING',
FURNISHED_RENT=u'FURNISHED_RENT',
VIAGER=u'VIAGER')
ADVERT_TYPES = enum(PROFESSIONAL=u'Professional', PERSONAL=u'Personal')
HOUSE_TYPES = enum(APART=u'Apartment',
HOUSE=u'House',
PARKING=u'Parking',
LAND=u'Land',
OTHER=u'Other',
UNKNOWN=u'Unknown')
import weboob.capabilities.recipe as OLD
# can't import *, __all__ is incomplete...
for attr in dir(OLD):
globals()[attr] = getattr(OLD, attr)
class Recipe(OLD.Recipe):
@property
def picture_url(self):
return getattr(self, 'picture', None) and self.picture.url
@property
def thumbnail_url(self):
return getattr(self, 'picture', None) and self.picture.thumbnail and self.picture.thumbnail.url
from weboob.exceptions import *
class AuthMethodNotImplemented(Exception):
pass
class CaptchaQuestion(Exception):
"""Site requires solving a CAPTCHA (base class)"""
# could be improved to pass the name of the backendconfig key
def __init__(self, type=None, **kwargs):
super(CaptchaQuestion, self).__init__("The site requires solving a captcha")
self.type = type
for key, value in kwargs.items():
setattr(self, key, value)
class ImageCaptchaQuestion(CaptchaQuestion):
type = 'image_captcha'
image_data = None
def __init__(self, image_data):
super(ImageCaptchaQuestion, self).__init__(self.type, image_data=image_data)
class NocaptchaQuestion(CaptchaQuestion):
type = 'g_recaptcha'
website_key = None
website_url = None
def __init__(self, website_key, website_url):
super(NocaptchaQuestion, self).__init__(self.type, website_key=website_key, website_url=website_url)
class RecaptchaQuestion(CaptchaQuestion):
type = 'g_recaptcha'
website_key = None
website_url = None
def __init__(self, website_key, website_url):
super(RecaptchaQuestion, self).__init__(self.type, website_key=website_key, website_url=website_url)
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