Skip to content

Commit

Permalink
ZEO stats monitor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
alga committed Mar 8, 2013
1 parent ef2007c commit f07858e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/ZEO/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def readable(self):
def handle_write(self):
s = "".join(self.buf)
self.buf = []
n = self.socket.send(s)
n = self.socket.send(s.encode('ascii'))
if n < len(s):
self.buf.append(s[:n])

Expand Down Expand Up @@ -184,8 +184,7 @@ def dump(self, f):
print(time.ctime(), file=f)
print(file=f)

L = self.stats.keys()
L.sort()
L = sorted(self.stats.keys())
for k in L:
stats = self.stats[k]
print("Storage:", k, file=f)
Expand Down
2 changes: 1 addition & 1 deletion src/ZEO/tests/testMonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_monitor_output(self):
else:
break
s.close()
return "".join(L)
return b"".join(L).decode('ascii')

def parse(self, s):
# Return a list of StorageStats, one for each storage.
Expand Down

0 comments on commit f07858e

Please sign in to comment.