Commit 9d325b0d authored by Francesco Pace's avatar Francesco Pace
Browse files

Fix equal comparison


Signed-off-by: default avatarFrancesco Pace <pace.francesco.g@gmail.com>
parent 335145a6
......@@ -25,7 +25,7 @@ class Crystal:
def transmit_policy(self, tenant, policy):
message = "{}:{}".format(tenant, policy)
if self.channel['protocol'] is 'rabbitmq':
if self.channel['protocol'] == 'rabbitmq':
log.debug("Transmitting policy to Crystal via RabbitMQ")
rmq = RabbitMQ(self.channel['username'], self.channel['password'], self.channel['host'])
rmq.open_connection()
......
......@@ -112,7 +112,7 @@ class ZoeSimpleScheduler(ZoeBaseScheduler):
plugins = e.description['plugins']
if 'storage' in plugins:
for plugin in plugins['storage']:
if plugin['name'] is 'crystal':
if plugin['name'] == 'crystal':
log.debug("Transmitting policy to Storage Plugin: Crystal")
Crystal(plugin['channel']).transmit_policy(plugin['tenant'], plugin['policy'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment