Check that output from list_vhosts can be split (#37630)
As with list_users, list_vhosts can sometimes return a value that
doesn't contain a '\t' character. This appears to be the case if the
server has no vhosts, for example.
The same fix was applied to the rabbitmq_users module here:
fafb89cde5
This commit is contained in:
parent
6ad784bbbb
commit
fcbee7e40b
1 changed files with 3 additions and 0 deletions
|
@ -76,6 +76,9 @@ class RabbitMqVhost(object):
|
|||
vhosts = self._exec(['list_vhosts', 'name', 'tracing'], True)
|
||||
|
||||
for vhost in vhosts:
|
||||
if '\t' not in vhost:
|
||||
continue
|
||||
|
||||
name, tracing = vhost.split('\t')
|
||||
if name == self.name:
|
||||
self._tracing = self.module.boolean(tracing)
|
||||
|
|
Loading…
Reference in a new issue