Author: remi
Date: 2009-03-31 12:46:23 +0200 (Tue, 31 Mar 2009)
New Revision: 4279
Modified:
software_suite_v2/tuxware/tuxdroidserver/trunk/util/SimpleGadget/GadgetHelper.py
software_suite_v2/tuxware/tuxdroidserver/trunk/util/SimpleGadget/SimpleGadget.py
Log:
* python gadget kit now support the "throwResult" command
Modified:
software_suite_v2/tuxware/tuxdroidserver/trunk/util/SimpleGadget/GadgetHelper.py
===================================================================
---
software_suite_v2/tuxware/tuxdroidserver/trunk/util/SimpleGadget/GadgetHelper.py
2009-03-31 10:40:57 UTC (rev 4278)
+++
software_suite_v2/tuxware/tuxdroidserver/trunk/util/SimpleGadget/GadgetHelper.py
2009-03-31 10:46:23 UTC (rev 4279)
@@ -65,6 +65,19 @@
GadgetHelper.throwNotification("trace", message)
#
--------------------------------------------------------------------------
+ # Throw the result of the "check" command to the framework.
+ #
--------------------------------------------------------------------------
+ def throwResult(result):
+ """Throw the result of the "check" command to the framework.
+ @param result: A boolean.
+ """
+ if result:
+ resultValue = "true"
+ else:
+ resultValue = "false"
+ GadgetHelper.throwNotification("check_result", resultValue)
+
+ #
--------------------------------------------------------------------------
# Throw an error message to the framework.
#
--------------------------------------------------------------------------
def throwError(message, sendTraceback = False):
@@ -91,4 +104,5 @@
throwNotification = staticmethod(throwNotification)
throwMessage = staticmethod(throwMessage)
throwTrace = staticmethod(throwTrace)
+ throwResult = staticmethod(throwResult)
throwError = staticmethod(throwError)
Modified:
software_suite_v2/tuxware/tuxdroidserver/trunk/util/SimpleGadget/SimpleGadget.py
===================================================================
---
software_suite_v2/tuxware/tuxdroidserver/trunk/util/SimpleGadget/SimpleGadget.py
2009-03-31 10:40:57 UTC (rev 4278)
+++
software_suite_v2/tuxware/tuxdroidserver/trunk/util/SimpleGadget/SimpleGadget.py
2009-03-31 10:46:23 UTC (rev 4279)
@@ -348,6 +348,19 @@
self.throwNotification("trace", message)
#
--------------------------------------------------------------------------
+ # Throw the result of the "check" command to the framework.
+ #
--------------------------------------------------------------------------
+ def throwResult(self, result):
+ """Throw the result of the "check" command to the framework.
+ @param result: A boolean.
+ """
+ if result:
+ resultValue = "true"
+ else:
+ resultValue = "false"
+ self.throwNotification("check_result", resultValue)
+
+ #
--------------------------------------------------------------------------
# Throw an error message to the framework.
#
--------------------------------------------------------------------------
def throwError(self, message, force = False):
------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn