[weboob] ReplApplication

Nicolas Jombi nicolas.duhamel2 at gmail.com
Fri Sep 24 17:22:29 CEST 2010



Bonjour,  

Je viens de rajouter la capacité d'effectuer des virements à
ICapBank et au backend bp. Mais je bloque pour rajouter la commande
transfer à boobank. 

Voici le code en question qui ne fonctionne pas:


def do_transfer(self, id_from, id_to, amount): 

 """ 

 Make a transfer
beetwen two account 

 """ 

 id_from, backend_name =
self.parse_id(id_from) 

 id_to, backend_name = self.parse_id(id_to) 


names = (backend_name,) if backend_name is not None else None 


self.load_backends(ICapBank, names=names) 

 def do(backend): 

 return
backend.transfer(id_from, id_to, amount) 

 for backend, operation in
self.do(do): 

 self.format(operation)  

Traceback (most recent call
last): 

 File "/home/nicolas/python/virtualenv/weboob/bin/boobank", line
7, in  

 execfile(__file__) 

 File
"/home/nicolas/python/weboob/scripts/boobank", line 25, in  


Boobank.run() 

 File
"/home/nicolas/python/weboob/weboob/tools/application/repl.py", line 139,
in run 

 super(ReplApplication, klass).run(args) 

 File
"/home/nicolas/python/weboob/weboob/tools/application/base.py", line 296,
in run 

 sys.exit(app.main(args)) 

 File
"/home/nicolas/python/weboob/weboob/tools/application/repl.py", line 155,
in main 

 self.cmdloop() 

 File "/usr/lib/python2.5/cmd.py", line 142, in
cmdloop 

 stop = self.onecmd(line) 

 File "/usr/lib/python2.5/cmd.py",
line 219, in onecmd 

 return func(arg) 

TypeError: do_transfer() takes
exactly 4 arguments (2 given)   Merci de votre aide.  PS: exim est enfin
configuré correctement après une lutte sans merci ! J'envois ma proposition
de patch dès que le problème de boobank sera réglé !  

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.symlink.me/pipermail/weboob/attachments/20100924/980fcb86/attachment.htm>


More information about the weboob mailing list