From f34ff5f31fcadd1695a22d492cd16c6d9d977719 Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 17 Jun 2010 17:29:23 +0000 Subject: [PATCH] - fix handling of greeting git-svn-id: https://pyst.svn.sourceforge.net/svnroot/pyst/pyst/trunk@4 01a3061f-1c3a-49da-a2a0-fa5697faa6a0 --- asterisk/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asterisk/manager.py b/asterisk/manager.py index 2365dfa..10a49f8 100644 --- a/asterisk/manager.py +++ b/asterisk/manager.py @@ -161,6 +161,7 @@ class Event(object): class Manager(object): def __init__(self): self._sock = None # our socket + self.title = None # set by received greeting self._connected = threading.Event() self._running = threading.Event() @@ -308,7 +309,7 @@ class Manager(object): break # check to see if this is the greeting line - if line.find('/') >= 0 and line.find(':') < 0: + if not self.title and line.find('/') >= 0 and line.find(':') < 0: self.title = line.split('/')[0].strip() # store the title of the manager we are connecting to self.version = line.split('/')[1].strip() # store the version of the manager we are connecting to break