Ignore extra lines from Pivotal's RabbitMQ package

Pivotal's packaging of RabbitMQ shows a banner at the end of the plugin
listing talking about their official plugins. The start of the banner is
divided by a blank line so the changed plugin listing will now
break after the first empty line.

An example listing with the rabbitmq_management plugin enabled:

```
    $ rabbitmq-plugins list -E -m
    rabbitmq_management

    Pivotal officially maintains and supports the plugins:

      rabbitmq_auth_backend_ldap, rabbitmq_auth_mechanism_ssl,
      rabbitmq_consistent_hash_exchange, rabbitmq_federation,
      rabbitmq_federation_management, rabbitmq_jms_topic_exchange,
      rabbitmq_management, rabbitmq_management_agent,
      rabbitmq_mqtt, rabbitmq_shovel, rabbitmq_shovel_management,
      and rabbitmq_stomp.
```
pull/18777/head
Björn Andersson 10 years ago committed by Matt Clay
parent 739ff5c807
commit 165c90e7c1

@ -88,7 +88,14 @@ class RabbitMqPlugins(object):
return list()
def get_all(self):
return self._exec(['list', '-E', '-m'], True)
list_output = self._exec(['list', '-E', '-m'], True)
plugins = []
for plugin in list_output:
if not plugin:
break
plugins.append(plugin)
return plugins
def enable(self, name):
self._exec(['enable', name])
@ -96,6 +103,7 @@ class RabbitMqPlugins(object):
def disable(self, name):
self._exec(['disable', name])
def main():
arg_spec = dict(
names=dict(required=True, aliases=['name']),

Loading…
Cancel
Save