diff options
| author | Ted Ross <tross@apache.org> | 2011-02-11 01:19:12 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2011-02-11 01:19:12 +0000 |
| commit | 0256258e435b9319d92251827c53d6495890020f (patch) | |
| tree | e7e17c593e4021bb05300ef6d22a82550e40e62d /qpid/cpp/bindings/qmf2/python | |
| parent | 93bfd4658c5715e122026f0bbd245eb362e74f7e (diff) | |
| download | qpid-python-0256258e435b9319d92251827c53d6495890020f.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@1069654 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings/qmf2/python')
| -rw-r--r-- | qpid/cpp/bindings/qmf2/python/qmf2.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qpid/cpp/bindings/qmf2/python/qmf2.py b/qpid/cpp/bindings/qmf2/python/qmf2.py index 61a5453f8e..2b8ece9dde 100644 --- a/qpid/cpp/bindings/qmf2/python/qmf2.py +++ b/qpid/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 |
