Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update memcache.py #175

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ def get_slab_stats(self):
readline = s.readline
while 1:
line = readline()
if not line or line.strip() == 'END':
if not line or line.decode('ascii').strip() == 'END':
break
item = line.split(' ', 2)
if line.startswith('STAT active_slabs') or line.startswith('STAT total_malloced'):
item = line.decode('ascii').split(' ', 2)
if line.decode('ascii').startswith('STAT active_slabs') or line.decode('ascii').startswith('STAT total_malloced'):
serverData[item[1]] = item[2]
else:
# 0 = STAT, 1 = ITEM, 2 = Value
Expand Down Expand Up @@ -380,9 +380,9 @@ def get_slabs(self):
readline = s.readline
while 1:
line = readline()
if not line or line.strip() == 'END':
if not line or line.decode('ascii').strip() == 'END':
break
item = line.split(' ', 2)
item = line.decode('ascii').split(' ', 2)
# 0 = STAT, 1 = ITEM, 2 = Value
slab = item[1].split(':', 2)
# 0 = items, 1 = Slab #, 2 = Name
Expand Down