Commit 36538eb0 by Őry Máté

vm: fix boolean comparsions

parent f8bb2ede
......@@ -29,7 +29,7 @@ def node_available(function):
"""Decorate methods to ignore disabled Nodes.
def decorate(self, *args, **kwargs):
if self.enabled is True and is True:
if self.enabled and
return function(self, *args, **kwargs)
return None
......@@ -106,7 +106,7 @@ class Node(TimeStampedModel):
def disable(self, user=None):
''' Disable the node.'''
if self.enabled is True:
if self.enabled:
with node_activity(code_suffix='disable', node=self, user=user):
self.enabled = False
......@@ -148,7 +148,7 @@ class Node(TimeStampedModel):
return + "." + queue_id
if self.enabled is True:
if self.enabled:
raise WorkerNotFound()
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 sign in to comment