support rabbitmq 3.8.x in version check (#66855)
* support rabbitmq 3.8.x in version check * Removed extraneous white space
This commit is contained in:
parent
b1de5d43fc
commit
6b017db05b
1 changed files with 6 additions and 0 deletions
|
@ -125,10 +125,16 @@ class RabbitMqPolicy(object):
|
|||
def _rabbit_version(self):
|
||||
status = self._exec(['status'], True, False, False)
|
||||
|
||||
# 3.7.x erlang style output
|
||||
version_match = re.search('{rabbit,".*","(?P<version>.*)"}', status)
|
||||
if version_match:
|
||||
return Version(version_match.group('version'))
|
||||
|
||||
# 3.8.x style ouput
|
||||
version_match = re.search('RabbitMQ version: (?P<version>.*)', status)
|
||||
if version_match:
|
||||
return Version(version_match.group('version'))
|
||||
|
||||
return None
|
||||
|
||||
def _list_policies(self):
|
||||
|
|
Loading…
Reference in a new issue