[weboob] Repl's fillobj

Christophe Benz christophe.benz at gmail.com
Tue Sep 28 11:48:08 CEST 2010


Le mardi 28 septembre 2010 à 09:32 +0200, Romain Bignon a écrit :
> Hi Christophe,
> 
> You have added in repl ability to set fields meta-values $direct and $full. I
> don't know if you've seen that I've commented this piece of code:
> 
> 	if fields == '$direct':
> 	    fields = None
> 	elif fields == '$full':
> 	    # XXX IT ABSOLUTELY DOESN'T WORK, OBJ DOESN'T EXIST.
> 	    # PLEASE REVIEW THIS CODE.
> 	    #fields = [k for k, v in iter_fields(obj)]
> 	    # TODO Perhaps this is the core goal to determine what
> 	    # fields to use,
> 	    # by creating a singleton AllFields.
> 	    fields = None

You're right, the $full value isn't implemented for the moment.
And yes, the bug with the obj variable is a shame for me!


> As comment says, we should give a constant to tell Backend's fillobj() to fill
> all fields of objects, instead of trying to resolve list of fields here, as we
> don't know what kind of object it is.

I agree for the creation of a singleton since the fields can evolve
between the construction of the 'fields' variable, and the search of new
objects.

Christophe




More information about the weboob mailing list