Skip to content

Commit f7d081e

Browse files
committed
Merge pull request #91 from bartTC/master
Python3: `get_stats` function fails due to Bytestring encoding errors
2 parents 120a16d + 8cc37bb commit f7d081e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

memcache.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ def get_stats(self, stat_args=None):
338338
readline = s.readline
339339
while 1:
340340
line = readline()
341-
if not line or line.strip() == 'END':
341+
if not line or line.decode('ascii').strip() == 'END':
342342
break
343-
stats = line.split(' ', 2)
343+
stats = line.decode('ascii').split(' ', 2)
344344
serverData[stats[1]] = stats[2]
345345

346346
return(data)

0 commit comments

Comments
 (0)