Ignore empty result of rabbitmqctl list_user_permissions (#35598)
Fix #34863
(cherry picked from commit a7221dd289
)
This commit is contained in:
parent
f5bc8457e4
commit
3cfbc2791f
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/34863-rabbitmq_user_unpack_fix.yaml
Normal file
2
changelogs/fragments/34863-rabbitmq_user_unpack_fix.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- Ignore empty result of rabbitmqctl list_user_permissions.
|
|
@ -172,7 +172,7 @@ class RabbitMqUser(object):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _get_permissions(self):
|
def _get_permissions(self):
|
||||||
perms_out = self._exec(['list_user_permissions', self.username], True)
|
perms_out = [perm for perm in self._exec(['list_user_permissions', self.username], True) if perm.strip()]
|
||||||
|
|
||||||
perms_list = list()
|
perms_list = list()
|
||||||
for perm in perms_out:
|
for perm in perms_out:
|
||||||
|
|
Loading…
Reference in a new issue