From 34bb4d52a1ee68ee5bef1fe0c042cb27da35d194 Mon Sep 17 00:00:00 2001 From: Florent Fourcot Date: Tue, 16 Jul 2013 22:59:36 +0200 Subject: [PATCH] Add a new caps parameter to get_object --- weboob/tools/application/repl.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/weboob/tools/application/repl.py b/weboob/tools/application/repl.py index 893e2590..1612f4e8 100644 --- a/weboob/tools/application/repl.py +++ b/weboob/tools/application/repl.py @@ -196,7 +196,7 @@ class ReplApplication(Cmd, ConsoleApplication): return id, backend_name - def get_object(self, _id, method, fields=None): + def get_object(self, _id, method, fields=None, caps=None): if self.interactive: try: obj = self.objects[int(_id) - 1] @@ -210,8 +210,11 @@ class ReplApplication(Cmd, ConsoleApplication): self.bcall_error_handler(backend, e, '') _id, backend_name = self.parse_id(_id) + kargs = {} + if caps is not None: + kargs = {'caps': caps} backend_names = (backend_name,) if backend_name is not None else self.enabled_backends - for backend, obj in self.do(method, _id, backends=backend_names, fields=fields): + for backend, obj in self.do(method, _id, backends=backend_names, fields=fields, **kargs): if obj: return obj