You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by he...@apache.org on 2010/12/29 01:30:02 UTC
svn commit: r1053490 - in /zookeeper/trunk: CHANGES.txt
src/contrib/zkpython/src/c/zookeeper.c
src/contrib/zkpython/src/test/acl_test.py
Author: henry
Date: Wed Dec 29 00:30:01 2010
New Revision: 1053490
URL: http://svn.apache.org/viewvc?rev=1053490&view=rev
Log:
ZOOKEEPER-921. zkPython incorrectly checks for existence of required ACL elements (Nicholas Knight via henryr)
Modified:
zookeeper/trunk/CHANGES.txt
zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c
zookeeper/trunk/src/contrib/zkpython/src/test/acl_test.py
Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1053490&r1=1053489&r2=1053490&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Wed Dec 29 00:30:01 2010
@@ -218,6 +218,9 @@ IMPROVEMENTS:
ZOOKEEPER-836. hostlist as string. (Thomas Koch via breed)
+ ZOOKEEPER-921. zkPython incorrectly checks for existence of required
+ ACL elements (Nicholas Knight via henryr)
+
NEW FEATURES:
ZOOKEEPER-729. Java client API to recursively delete a subtree.
(Kay Kay via henry)
Modified: zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c?rev=1053490&r1=1053489&r2=1053490&view=diff
==============================================================================
--- zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c (original)
+++ zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c Wed Dec 29 00:30:01 2010
@@ -301,17 +301,17 @@ int check_is_acl(PyObject *o) {
return 0;
}
entry = PyDict_GetItemString( element, "perms" );
- if (entry == Py_None) {
+ if (entry == NULL) {
return 0;
}
entry = PyDict_GetItemString( element, "scheme" );
- if (entry == Py_None) {
+ if (entry == NULL) {
return 0;
}
entry = PyDict_GetItemString( element, "id" );
- if (entry == Py_None) {
+ if (entry == NULL) {
return 0;
}
}
Modified: zookeeper/trunk/src/contrib/zkpython/src/test/acl_test.py
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/contrib/zkpython/src/test/acl_test.py?rev=1053490&r1=1053489&r2=1053490&view=diff
==============================================================================
--- zookeeper/trunk/src/contrib/zkpython/src/test/acl_test.py (original)
+++ zookeeper/trunk/src/contrib/zkpython/src/test/acl_test.py Wed Dec 29 00:30:01 2010
@@ -96,7 +96,7 @@ class ACLTest(zktestbase.TestBase):
def test_invalid_acl2(self):
"""Verify all required keys are present in the ACL."""
- invalid_acl = [{"schema": "digest", "id": "zebra"}],
+ invalid_acl = [{"schema": "digest", "id": "zebra"}]
self.assertRaises(zookeeper.InvalidACLException,
zookeeper.create,
self.handle,