From ae7f7c2c6423d2cf6afaca1d76eae003673527d6 Mon Sep 17 00:00:00 2001 From: Mike Liu Date: Sat, 5 Sep 2015 12:37:32 -0400 Subject: [PATCH] Check that the current output from 'list_users' command contains a '\t'. The `rabbitmqctl list_users` command will list the user's last login time which does not include `\t` character. This is causing a ValueError exception when attempting to split a user and its tags from the command output. This fix will check for a `\t` in the current line of the output before splitting. --- messaging/rabbitmq_user.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/messaging/rabbitmq_user.py b/messaging/rabbitmq_user.py index b12178e08ea..c6ff6a41928 100644 --- a/messaging/rabbitmq_user.py +++ b/messaging/rabbitmq_user.py @@ -136,6 +136,9 @@ class RabbitMqUser(object): users = self._exec(['list_users'], True) for user_tag in users: + if '\t' not in user_tag: + continue + user, tags = user_tag.split('\t') if user == self.username: