summaryrefslogtreecommitdiff
path: root/qpid/cpp/bindings/qmf2/python/qmf2.py
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/bindings/qmf2/python/qmf2.py')
-rw-r--r--qpid/cpp/bindings/qmf2/python/qmf2.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/qpid/cpp/bindings/qmf2/python/qmf2.py b/qpid/cpp/bindings/qmf2/python/qmf2.py
index 61a5453f8e..9f2d8556f4 100644
--- a/qpid/cpp/bindings/qmf2/python/qmf2.py
+++ b/qpid/cpp/bindings/qmf2/python/qmf2.py
@@ -165,7 +165,7 @@ class ConsoleHandler(Thread):
reason = 'filter'
if event.getAgentDelReason() == cqmf2.AGENT_DEL_AGED:
reason = 'aged'
- self.agentDeleted(Agent(event.getAgent(), reason))
+ self.agentDeleted(Agent(event.getAgent()), reason)
elif event.getType() == cqmf2.CONSOLE_AGENT_RESTART:
self.agentRestarted(Agent(event.getAgent()))
@@ -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