Commit f07858e6 authored by Albertas Agejevas's avatar Albertas Agejevas

ZEO stats monitor fixes.

parent ef2007c3
...@@ -139,7 +139,7 @@ class StatsClient(asyncore.dispatcher): ...@@ -139,7 +139,7 @@ class StatsClient(asyncore.dispatcher):
def handle_write(self): def handle_write(self):
s = "".join(self.buf) s = "".join(self.buf)
self.buf = [] self.buf = []
n = self.socket.send(s) n = self.socket.send(s.encode('ascii'))
if n < len(s): if n < len(s):
self.buf.append(s[:n]) self.buf.append(s[:n])
...@@ -184,8 +184,7 @@ class StatsServer(asyncore.dispatcher): ...@@ -184,8 +184,7 @@ class StatsServer(asyncore.dispatcher):
print(time.ctime(), file=f) print(time.ctime(), file=f)
print(file=f) print(file=f)
L = self.stats.keys() L = sorted(self.stats.keys())
L.sort()
for k in L: for k in L:
stats = self.stats[k] stats = self.stats[k]
print("Storage:", k, file=f) print("Storage:", k, file=f)
......
...@@ -37,7 +37,7 @@ class MonitorTests(CommonSetupTearDown): ...@@ -37,7 +37,7 @@ class MonitorTests(CommonSetupTearDown):
else: else:
break break
s.close() s.close()
return "".join(L) return b"".join(L).decode('ascii')
def parse(self, s): def parse(self, s):
# Return a list of StorageStats, one for each storage. # Return a list of StorageStats, one for each storage.
......
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