X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethod.py;h=e2250ea84bca3247e045c0b1bd87a1c84dfaee2a;hb=6133026e519d0412d1151cb9272ad6bde0abd18e;hp=976dfe1776112ce3ca28a9d98c72f36d85c5c637;hpb=050ecfde01b446b88d0c2db533d72d1a25ff601b;p=plcapi.git diff --git a/PLC/Method.py b/PLC/Method.py index 976dfe1..e2250ea 100644 --- a/PLC/Method.py +++ b/PLC/Method.py @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: Method.py,v 1.19 2006/11/29 17:57:27 tmack Exp $ +# $Id: Method.py,v 1.20 2006/12/20 14:08:40 tmack Exp $ # import xmlrpclib @@ -92,7 +92,7 @@ class Method: result = self.call(*args, **kwds) runtime = time.time() - start - if self.api.config.PLC_API_DEBUG: + if self.api.config.PLC_API_DEBUG or hasattr(self, 'message'): self.log(0, runtime, *args) return result @@ -139,17 +139,16 @@ class Method: event.sync(commit = False) - # XXX object_ids is currently defined as a class variable if hasattr(self, 'object_ids'): for object_id in self.object_ids: event.add_object(object_id, commit = False) - # Get message for this event + # Set the message for this event if hasattr(self, 'message'): - event['message'] = self.message + event['message'] = self.message # Commit - event.sync(commit = True) + event.sync() def help(self, indent = " "): """