diff --git a/.gitignore b/.gitignore index 9736a95..9ca4042 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ __pycache__/ # Auto-generated files. MANIFEST + +# IDE +.idea \ No newline at end of file diff --git a/asterisk/manager.py b/asterisk/manager.py index 3453892..fcb5f32 100644 --- a/asterisk/manager.py +++ b/asterisk/manager.py @@ -333,9 +333,10 @@ def _receive_data(self): break # ignore empty lines at start continue - # If the user executed the status command, it's a special + # If the user executed the status command or other + # command with multiline response, it's a special # case, so we need to look for a marker. - if 'status will follow' in line: + if 'EventList: start' in line: status = True wait_for_marker = True lines.append(line) @@ -353,8 +354,8 @@ def _receive_data(self): if multiline and (line.startswith('--END COMMAND--') or line.strip().endswith('--END COMMAND--')): wait_for_marker = False multiline = False - # same when seeing end of status response - if status and 'StatusComplete' in line: + # same when seeing end of status of multiline response + if status and 'EventList: Complete' in line: wait_for_marker = False status = False if not self._connected.isSet():