diff --git a/NodeInstance.py b/NodeInstance.py index 437a19d3..a152b91b 100644 --- a/NodeInstance.py +++ b/NodeInstance.py @@ -185,7 +185,7 @@ class NodeInstance(): self.zk.set(self.zkey + '/memfree', str(self.memfree).encode('ascii')) self.zk.set(self.zkey + '/cpuload', str(self.cpuload).encode('ascii')) self.zk.set(self.zkey + '/runningdomains', ' '.join(self.domain_list).encode('ascii')) - self.zk.set(self.zkey + '/keepalive', keepalive_time.encode('ascii')) + self.zk.set(self.zkey + '/keepalive', str(keepalive_time).encode('ascii')) except: return diff --git a/pvcd.py b/pvcd.py index 18c20161..af33da2e 100755 --- a/pvcd.py +++ b/pvcd.py @@ -84,7 +84,7 @@ else: zk.create('%s/memfree' % mynodestring, '0'.encode('ascii')) zk.create('%s/cpuload' % mynodestring, '0.0'.encode('ascii')) zk.create('%s/runningdomains' % mynodestring, ''.encode('ascii')) - zk.create('%s/keepalive' % mynodestring, keepalive_time.encode('ascii')) + zk.create('%s/keepalive' % mynodestring, str(keepalive_time).encode('ascii')) t_node = dict() s_domain = dict()