split module loader in ModulesLoader and BackendsConfig classes
This commit is contained in:
parent
d03bd47981
commit
56fea28640
8 changed files with 141 additions and 49 deletions
|
|
@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
"""
|
||||
|
||||
from .cap import ICap
|
||||
|
||||
class AccountNotFound(Exception): pass
|
||||
|
||||
class Account(object):
|
||||
|
|
@ -69,7 +71,7 @@ class Operation(object):
|
|||
self.amount = amount
|
||||
|
||||
|
||||
class ICapBank:
|
||||
class ICapBank(ICap):
|
||||
def iter_accounts(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
import datetime
|
||||
import time
|
||||
|
||||
from .cap import ICap
|
||||
|
||||
class Message:
|
||||
def __init__(self, thread_id, _id, title, sender, date=None, reply_id=u'', content=u'', signature=u''):
|
||||
self.thread_id = unicode(thread_id)
|
||||
|
|
@ -80,7 +82,7 @@ class Message:
|
|||
self.id, self.title, self.date, self.sender)
|
||||
return result.encode('utf-8')
|
||||
|
||||
class ICapMessages:
|
||||
class ICapMessages(ICap):
|
||||
def iter_new_messages(self):
|
||||
"""
|
||||
Iterates on new messages from last time this function has been called.
|
||||
|
|
@ -95,6 +97,6 @@ class ICapMessages:
|
|||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
class ICapMessagesReply:
|
||||
class ICapMessagesReply(ICap):
|
||||
def post_reply(self, to, message):
|
||||
raise NotImplementedError()
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
from datetime import time
|
||||
|
||||
class ICapTravel:
|
||||
from .cap import ICap
|
||||
|
||||
class ICapTravel(ICap):
|
||||
def iter_station_search(self, pattern):
|
||||
"""
|
||||
Iterates on search results of stations.
|
||||
|
|
|
|||
|
|
@ -18,8 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
"""
|
||||
|
||||
from .cap import ICap
|
||||
|
||||
class ICapUpdatable:
|
||||
class ICapUpdatable(ICap):
|
||||
snapshots = {}
|
||||
|
||||
def take_snapshot(self, name, collection):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue