Patchwork [bitbake-devel,8/9] command.py: Add a new API triggerEvent()

login
register
mail settings
Submitter Dongxiao Xu
Date Feb. 23, 2012, 1:47 p.m.
Message ID <f12419b3cecd0e05b7df69709cb14dc23dd67a28.1330003017.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/21699/
State Accepted
Commit 45da6d709a69697158fae92e1c0c0a6ac8f30831
Headers show

Comments

Dongxiao Xu - Feb. 23, 2012, 1:47 p.m.
This functions enables the client to request triggering specific event
from bitbake server.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/command.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/lib/bb/command.py b/lib/bb/command.py
index 43875f7..06e8869 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -179,6 +179,12 @@  class CommandsSync:
         """
         return bb.utils.cpu_count()
 
+    def triggerEvent(self, command, params):
+        """
+        Trigger a certain event
+        """
+        event = params[0]
+        bb.event.fire(eval(event), command.cooker.configuration.data)
 
 class CommandsAsync:
     """