diff options
author | liquidpele <reecepegues+github@gmail.com> | 2022-03-25 16:15:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-25 13:15:33 -0700 |
commit | 88e6b6369c7cc68baee51263482c52ac8e33fdab (patch) | |
tree | db6bea5def4de5752bd81e47227214529c94afcb /ChangeLog.rst | |
parent | 28e05a3f97728fed3b908b8827f8de472a405a6d (diff) | |
download | pymemcache-88e6b6369c7cc68baee51263482c52ac8e33fdab.tar.gz |
Handle a blank stat value (#388)
A stat with a blank value makes the .stats() call fail with index error.
```
memcache_connection.stats()
File "/lib/python3.6/site-packages/pymemcache/client/base.py", line 741, in stats
result = self._fetch_cmd(b'stats', args, False)
File "/lib/python3.6/site-packages/pymemcache/client/base.py", line 921, in _fetch_cmd
result[key_value[1]] = key_value[2]
IndexError: list index out of range
```
The line in question we saw that caused this:
```
b'STAT ep_initfile '
```
This fixes things to no longer blow up. I chose to use a blank binary string instead of None because I suspect other code might make assumptions about the data being binary strings due to this bug.
Co-authored-by: reecepeg <reecepeg@amazon.com>
Diffstat (limited to 'ChangeLog.rst')
0 files changed, 0 insertions, 0 deletions