From 4a6fe0318507843ee20513ff26b20fc4962c4ed0 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 31 Aug 2010 16:05:04 +0200 Subject: [PATCH] Set accessors return the new value --- PLC/Accessors/Factory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.47.0