summaryrefslogtreecommitdiff
path: root/cpp/bindings/qmf2/python
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2011-02-11 01:19:12 +0000
committerTed Ross <tross@apache.org>2011-02-11 01:19:12 +0000
commitfc8f2c93b118b3026ab2f5274127b41938d5590f (patch)
tree6e2737131084ff9fc5673aa2e9736030a216ffd7 /cpp/bindings/qmf2/python
parent3cdd83cadf8010310ddcf54f1724c77001d2d02c (diff)
downloadqpid-python-fc8f2c93b118b3026ab2f5274127b41938d5590f.tar.gz
QPID-3046
Added missing wrapper functions for AgentSession::raiseEvent in Ruby and Python Added a raised event in the Python agent example git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1069654 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qmf2/python')
-rw-r--r--cpp/bindings/qmf2/python/qmf2.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/bindings/qmf2/python/qmf2.py b/cpp/bindings/qmf2/python/qmf2.py
index 61a5453f8e..2b8ece9dde 100644
--- a/cpp/bindings/qmf2/python/qmf2.py
+++ b/cpp/bindings/qmf2/python/qmf2.py
@@ -373,6 +373,16 @@ class AgentSession(object):
else:
self._impl.raiseException(handle, data)
+ def raiseEvent(self, data, severity=None):
+ """
+ """
+ if not severity:
+ self._impl.raiseEvent(data._impl)
+ else:
+ if (severity.__class__ != int and severity.__class__ != long) or severity < 0 or severity > 7:
+ raise Exception("Severity must be an int between 0..7")
+ self._impl.raiseEvent(data._impl, severity);
+
#===================================================================================================
# AGENT PROXY