server.expect("END") needs to be in a finally block
Bug #713451 reported by
Jay Farrimond
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python Memcached |
Fix Released
|
Undecided
|
Sean Reifschneider |
Bug Description
In the _get() function, the server.
In my specific case, _recv_value() was occasionally throwing exceptions from decompress() when it got bad data to decompress, which is what was causing this. The fact that the data to decompress was bad is my own fault, but this could happen to others and is very easy to fix.
Changed in python-memcached: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Here's the code I implemented to fix this:
try: value(server, flags, rlen) expect( "END")
value = self._recv_
finally:
server.