From 4c59fe03aade5ade92b1074d8de23d7fbd4cba9e Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 4 Jun 2018 12:22:21 -0400 Subject: [PATCH] Remove some logic from wtach functions --- VMInstance.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/VMInstance.py b/VMInstance.py index 8da2a3e9..ae441723 100644 --- a/VMInstance.py +++ b/VMInstance.py @@ -24,16 +24,12 @@ class VMInstance: # Watch for changes to the hypervisor field in Zookeeper @zk.DataWatch(self.zkey + '/hypervisor') def watch_hypervisor(data, stat, event=""): - if self.hypervisor != data.decode('ascii'): - self.hypervisor = data.decode('ascii') - self.manage_vm_state() + self.manage_vm_state() # Watch for changes to the state field in Zookeeper @zk.DataWatch(self.zkey + '/state') def watch_state(data, stat, event=""): - if self.state != data.decode('ascii'): - self.state = data.decode('ascii') - self.manage_vm_state() + self.manage_vm_state() # Get data functions def getstate(self):