Display renew confirmation/errors
This commit is contained in:
parent
03f998a33f
commit
65251c4ceb
5 changed files with 24 additions and 10 deletions
|
|
@ -20,7 +20,7 @@
|
|||
from weboob.capabilities.library import ICapBook, Book
|
||||
from weboob.tools.application.repl import ReplApplication
|
||||
from weboob.tools.application.formatters.iformatter import IFormatter
|
||||
|
||||
import sys
|
||||
|
||||
__all__ = ['Boobooks']
|
||||
|
||||
|
|
@ -78,4 +78,6 @@ class Boobooks(ReplApplication):
|
|||
return 2
|
||||
names = (backend_name,) if backend_name is not None else None
|
||||
|
||||
self.do('renew_book', id, backends=names)
|
||||
for backend, renew in self.do('renew_book', id, backends=names):
|
||||
self.format(renew)
|
||||
self.flush()
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ class Book(CapBaseObject):
|
|||
self.add_field('date', (datetime, date)) # which may be the due date
|
||||
self.add_field('late', bool)
|
||||
|
||||
class Renew(CapBaseObject):
|
||||
def __init__(self, id):
|
||||
CapBaseObject.__init__(self, id)
|
||||
self.add_field('message', basestring)
|
||||
|
||||
class ICapBook(ICapCollection):
|
||||
def iter_resources(self, objs, split_path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue