fix backends initialization
This commit is contained in:
parent
e8349f5ddc
commit
7d274c74b7
6 changed files with 4 additions and 15 deletions
|
|
@ -25,8 +25,9 @@ class Backend:
|
|||
VERSION = '<unspecified>'
|
||||
LICENSE = '<unspecified>'
|
||||
|
||||
def __init__(self, weboob):
|
||||
def __init__(self, weboob, config):
|
||||
self.weboob = weboob
|
||||
self.config = config
|
||||
|
||||
def has_caps(self, *caps):
|
||||
for c in caps:
|
||||
|
|
|
|||
|
|
@ -27,8 +27,5 @@ class AuMBackend(Backend, ICapMessages, ICapMessagesReply):
|
|||
VERSION = '1.0'
|
||||
LICENSE = 'GPLv3'
|
||||
|
||||
def __init__(self, weboob):
|
||||
Backend.__init__(self, weboob)
|
||||
|
||||
def iter_messages(self, thread=None):
|
||||
return dict().iteritems()
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ class CanalTPBackend(Backend, ICapTravel):
|
|||
VERSION = '1.0'
|
||||
LICENSE = 'GPLv3'
|
||||
|
||||
def __init__(self, weboob):
|
||||
Backend.__init__(self, weboob)
|
||||
|
||||
def iter_station_search(self, pattern):
|
||||
canaltp = CanalTP()
|
||||
for _id, name in canaltp.iter_station_search(pattern):
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ class DLFPBackend(Backend, ICapMessages, ICapMessagesReply, ICapUpdatable):
|
|||
VERSION = '1.0'
|
||||
LICENSE = 'GPLv3'
|
||||
|
||||
def __init__(self, weboob):
|
||||
Backend.__init__(self, weboob)
|
||||
|
||||
def iter_messages(self):
|
||||
articles_list = ArticlesList('newspaper')
|
||||
for article in articles_list.iter_articles():
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@ class TransilienBackend(Backend, ICapTravel):
|
|||
VERSION = '1.0'
|
||||
LICENSE = 'GPLv3'
|
||||
|
||||
def __init__(self, weboob):
|
||||
Backend.__init__(self, weboob)
|
||||
|
||||
def iter_station_search(self, pattern):
|
||||
pattern = pattern.lower()
|
||||
for _id, name in STATIONS.iteritems():
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ class Module:
|
|||
return True
|
||||
return False
|
||||
|
||||
def create_backend(self, weboob):
|
||||
return self.klass(weboob)
|
||||
def create_backend(self, weboob, config):
|
||||
return self.klass(weboob, config)
|
||||
|
||||
class ModulesLoader:
|
||||
def __init__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue