Skip to content

Commit

Permalink
Add byte prefix to some strings, for python 3 support
Browse files Browse the repository at this point in the history
Should fix some of the issues in linsomniac#84
  • Loading branch information
JelteF committed Jan 8, 2016
1 parent 37f55ca commit befc539
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ def get_stats(self, stat_args=None):
readline = s.readline
while 1:
line = readline()
if not line or line.strip() == 'END':
if not line or line.strip() == b'END':
break
stats = line.split(' ', 2)
stats = line.split(b' ', 2)
serverData[stats[1]] = stats[2]

return(data)
Expand All @@ -357,11 +357,11 @@ def get_slabs(self):
readline = s.readline
while 1:
line = readline()
if not line or line.strip() == 'END':
if not line or line.strip() == b'END':
break
item = line.split(' ', 2)
item = line.split(b' ', 2)
# 0 = STAT, 1 = ITEM, 2 = Value
slab = item[1].split(':', 2)
slab = item[1].split(b':', 2)
# 0 = items, 1 = Slab #, 2 = Name
if slab[1] not in serverData:
serverData[slab[1]] = {}
Expand Down

0 comments on commit befc539

Please sign in to comment.