From caf94ddb590c71975d50ff05c7fa3a1e3b5e3618 Mon Sep 17 00:00:00 2001 From: Aleksandr Sorokoumov Date: Sun, 26 Aug 2012 16:30:34 +0400 Subject: [PATCH] representation of managermsg was fixed --- asterisk/manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/asterisk/manager.py b/asterisk/manager.py index 70541f6..5bb5b84 100644 --- a/asterisk/manager.py +++ b/asterisk/manager.py @@ -124,8 +124,12 @@ class ManagerMsg(object): def __getitem__(self, hname): """Return the specfied header""" return self.headers[hname] + def __repr__(self): - return self.headers['Response'] + if 'Response' in self.headers: + return self.headers['Response'] + else: + return self.headers['Event'] class Event(object):