hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r824981 - /hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c
Date Wed, 14 Oct 2009 00:10:13 GMT
Author: phunt
Date: Wed Oct 14 00:10:13 2009
New Revision: 824981

URL: http://svn.apache.org/viewvc?rev=824981&view=rev
Log:
ZOOKEEPER-510. zkpython lumps all exceptions as IOError, needs specialized exceptions for
KeeperException types (applying the incremental patch)

Modified:
    hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c?rev=824981&r1=824980&r2=824981&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c Wed Oct 14 00:10:13 2009
@@ -1114,6 +1114,7 @@
 
 
 #define ADD_EXCEPTION(x) x = PyErr_NewException("zookeeper."#x, ZooKeeperException, NULL);
\
+	Py_INCREF(x); \
   PyModule_AddObject(module, #x, x);
 
 
@@ -1126,8 +1127,8 @@
 					  PyExc_Exception,
 					  NULL);
 
-  PyModule_AddObject(module, "ZooKeeperException", ZooKeeperException);
-  
+	PyModule_AddObject(module, "ZooKeeperException", ZooKeeperException);
+  Py_INCREF(ZooKeeperException);
 
   ADD_INTCONSTANT(PERM_READ);
   ADD_INTCONSTANT(PERM_WRITE);



Mime
View raw message