Skip to content
Browse files

Merge commit '5cfc5e1'

Conflicts:
	tests/doctests.txt
  • Loading branch information...
2 parents c000d7a + 5cfc5e1 commit def0eabf1fc6d4f12ff0eb06c5fbe2a072b763b4 @lericson committed Apr 26, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −1 _pylibmcmodule.c
  2. +6 −0 tests/doctests.txt
View
2 _pylibmcmodule.c
@@ -520,7 +520,7 @@ static PyObject *PylibMC_Client_gets(PylibMC_Client *self, PyObject *arg) {
ret = NULL;
PyErr_SetString(PyExc_RuntimeError, "fetch not done");
}
- } else if (rc == MEMCACHED_END) {
+ } else if (rc == MEMCACHED_END || rc == MEMCACHED_NOTFOUND) {
/* Key not found => (None, None) */
ret = Py_BuildValue("(OO)", Py_None, Py_None);
} else {
View
6 tests/doctests.txt
@@ -265,3 +265,9 @@ ValueError: key too long, max is 250
Make sure ServerDown exception exists
>>> hasattr(pylibmc, 'ServerDown')
True
+
+Gets should return (None, None) for non-existing keys
+>>> c = make_test_client(_pylibmc.client, binary=True)
+>>> c.set_behaviors({'cas': True})
+>>> c.gets('non_existing_key')
+(None, None)

0 comments on commit def0eab

Please sign in to comment.
Something went wrong with that request. Please try again.