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>'
|
VERSION = '<unspecified>'
|
||||||
LICENSE = '<unspecified>'
|
LICENSE = '<unspecified>'
|
||||||
|
|
||||||
def __init__(self, weboob):
|
def __init__(self, weboob, config):
|
||||||
self.weboob = weboob
|
self.weboob = weboob
|
||||||
|
self.config = config
|
||||||
|
|
||||||
def has_caps(self, *caps):
|
def has_caps(self, *caps):
|
||||||
for c in caps:
|
for c in caps:
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,5 @@ class AuMBackend(Backend, ICapMessages, ICapMessagesReply):
|
||||||
VERSION = '1.0'
|
VERSION = '1.0'
|
||||||
LICENSE = 'GPLv3'
|
LICENSE = 'GPLv3'
|
||||||
|
|
||||||
def __init__(self, weboob):
|
|
||||||
Backend.__init__(self, weboob)
|
|
||||||
|
|
||||||
def iter_messages(self, thread=None):
|
def iter_messages(self, thread=None):
|
||||||
return dict().iteritems()
|
return dict().iteritems()
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,6 @@ class CanalTPBackend(Backend, ICapTravel):
|
||||||
VERSION = '1.0'
|
VERSION = '1.0'
|
||||||
LICENSE = 'GPLv3'
|
LICENSE = 'GPLv3'
|
||||||
|
|
||||||
def __init__(self, weboob):
|
|
||||||
Backend.__init__(self, weboob)
|
|
||||||
|
|
||||||
def iter_station_search(self, pattern):
|
def iter_station_search(self, pattern):
|
||||||
canaltp = CanalTP()
|
canaltp = CanalTP()
|
||||||
for _id, name in canaltp.iter_station_search(pattern):
|
for _id, name in canaltp.iter_station_search(pattern):
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,6 @@ class DLFPBackend(Backend, ICapMessages, ICapMessagesReply, ICapUpdatable):
|
||||||
VERSION = '1.0'
|
VERSION = '1.0'
|
||||||
LICENSE = 'GPLv3'
|
LICENSE = 'GPLv3'
|
||||||
|
|
||||||
def __init__(self, weboob):
|
|
||||||
Backend.__init__(self, weboob)
|
|
||||||
|
|
||||||
def iter_messages(self):
|
def iter_messages(self):
|
||||||
articles_list = ArticlesList('newspaper')
|
articles_list = ArticlesList('newspaper')
|
||||||
for article in articles_list.iter_articles():
|
for article in articles_list.iter_articles():
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,6 @@ class TransilienBackend(Backend, ICapTravel):
|
||||||
VERSION = '1.0'
|
VERSION = '1.0'
|
||||||
LICENSE = 'GPLv3'
|
LICENSE = 'GPLv3'
|
||||||
|
|
||||||
def __init__(self, weboob):
|
|
||||||
Backend.__init__(self, weboob)
|
|
||||||
|
|
||||||
def iter_station_search(self, pattern):
|
def iter_station_search(self, pattern):
|
||||||
pattern = pattern.lower()
|
pattern = pattern.lower()
|
||||||
for _id, name in STATIONS.iteritems():
|
for _id, name in STATIONS.iteritems():
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@ class Module:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def create_backend(self, weboob):
|
def create_backend(self, weboob, config):
|
||||||
return self.klass(weboob)
|
return self.klass(weboob, config)
|
||||||
|
|
||||||
class ModulesLoader:
|
class ModulesLoader:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue