Skip to content

Commit

Permalink
Ignore empty result of rabbitmqctl list_user_permissions (ansible#35598)
Browse files Browse the repository at this point in the history
Fix ansible#34863

(cherry picked from commit a7221dd)
  • Loading branch information
cadl authored and Akasurde committed Oct 2, 2018
1 parent 2e60b83 commit 29f9051
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/34863-rabbitmq_user_unpack_fix.yaml
@@ -0,0 +1,2 @@
bugfixes:
- Ignore empty result of rabbitmqctl list_user_permissions.
2 changes: 1 addition & 1 deletion lib/ansible/modules/messaging/rabbitmq_user.py
Expand Up @@ -172,7 +172,7 @@ def get(self):
return False

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()
for perm in perms_out:
Expand Down

0 comments on commit 29f9051

Please sign in to comment.