Skip to content

Commit befc539

Browse files
committed
Add byte prefix to some strings, for python 3 support
Should fix some of the issues in linsomniac#84
1 parent 37f55ca commit befc539

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

memcache.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ def get_stats(self, stat_args=None):
333333
readline = s.readline
334334
while 1:
335335
line = readline()
336-
if not line or line.strip() == 'END':
336+
if not line or line.strip() == b'END':
337337
break
338-
stats = line.split(' ', 2)
338+
stats = line.split(b' ', 2)
339339
serverData[stats[1]] = stats[2]
340340

341341
return(data)
@@ -357,11 +357,11 @@ def get_slabs(self):
357357
readline = s.readline
358358
while 1:
359359
line = readline()
360-
if not line or line.strip() == 'END':
360+
if not line or line.strip() == b'END':
361361
break
362-
item = line.split(' ', 2)
362+
item = line.split(b' ', 2)
363363
# 0 = STAT, 1 = ITEM, 2 = Value
364-
slab = item[1].split(':', 2)
364+
slab = item[1].split(b':', 2)
365365
# 0 = items, 1 = Slab #, 2 = Name
366366
if slab[1] not in serverData:
367367
serverData[slab[1]] = {}

0 commit comments

Comments
 (0)