From 3795ab0379000f793ec3e82e57d81756ee37206e Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Fri, 24 Oct 2014 13:41:29 +0200 Subject: [PATCH] Clear rabbitmq_user pw when none is specified --- messaging/rabbitmq_user.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/messaging/rabbitmq_user.py b/messaging/rabbitmq_user.py index 1cbee360dff..b19ec1fc097 100644 --- a/messaging/rabbitmq_user.py +++ b/messaging/rabbitmq_user.py @@ -162,7 +162,11 @@ class RabbitMqUser(object): return dict() def add(self): - self._exec(['add_user', self.username, self.password]) + if self.password is not None: + self._exec(['add_user', self.username, self.password]) + else + self._exec(['add_user', self.username, '']) + self._exec(['clear_password', self.username]) def delete(self): self._exec(['delete_user', self.username])