Hi all,
I've discovered a small bug in the python bindings, specifically with the zookeeper.set2() call. This method should return a stat dictionary, but actually returns None. The fix is a one-character change to zookeeper.c:

--- zookeeper.c.orig    2011-03-24 11:52:27.000000000 -0400
+++ zookeeper.c    2011-03-24 12:22:01.000000000 -0400
@@ -1150,7 +1150,7 @@
     return NULL;
   }

-  return build_stat(stat);
+  return build_stat(&stat);
 }

 /* As per ZK documentation, datanodes are limited to 1Mb. Why not do a

I'd like to go ahead and file a bug and submit the patch, but the suggestion on the contribute page says to send a message here first for good measure. :-) I've added to the get_set_test.py unit test under zkpython/src/test, and I'll submit that as well. Can someone let me know if it's cool that I proceed?

I'll have another submission soon to help clean up pyzk_docstrings.h for the python bindings as well. I'm hoping Henry (or someone) can maybe review that prior to submission.

Best regards,

Chris Medaglia
ITA Software

Reply via email to