From: Thierry Parmentelat Date: Tue, 31 Aug 2010 14:05:04 +0000 (+0200) Subject: Set accessors return the new value X-Git-Tag: plcapi-5.0-16~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4a6fe0318507843ee20513ff26b20fc4962c4ed0;p=plcapi.git Set accessors return the new value --- diff --git a/PLC/Accessors/Factory.py b/PLC/Accessors/Factory.py index 546e3d91..fc1cb174 100644 --- a/PLC/Accessors/Factory.py +++ b/PLC/Accessors/Factory.py @@ -54,7 +54,7 @@ tech_roles = [ 'admin', 'pi', 'tech' ] # # generates 2 method classes: # Get (auth, id_or_name) -> value or None -# Set (auth, id_or_name, value) -> None +# Set (auth, id_or_name, value) -> value # value is always a string, no cast nor typecheck for now # # The expose_in_api flag tells whether this tag may be handled @@ -201,6 +201,7 @@ def define_accessors (module, objclass, methodsuffix, tagname, else: self.message += " %d "%objs[0][primary_key] self.message += "updated" + return value # attach it setattr (set_class,"call",set_call)