浏览代码

ZOOKEEPER-1318. In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly (henryr via michim)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1336467 13f79535-47bb-0310-9956-ffa450edef68
Michi Mutsuzaki 13 年之前
父节点
当前提交
136215a230
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 3 0
      CHANGES.txt
  2. 2 1
      src/contrib/zkpython/src/c/zookeeper.c

+ 3 - 0
CHANGES.txt

@@ -178,6 +178,9 @@ BUGFIXES:
   ZOOKEEPER-1048. addauth command does not work in cli_mt/cli_st
   (allengao via michim)
 
+  ZOOKEEPER-1318. In Python binding, get_children (and get and exists, and probably others)
+  with expired session doesn't raise exception properly (henryr via michim)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-1170. Fix compiler (eclipse) warnings: unused imports,

+ 2 - 1
src/contrib/zkpython/src/c/zookeeper.c

@@ -66,6 +66,8 @@ PyObject *err_to_exception(int errcode) {
     return OperationTimeoutException;
   case ZBADARGUMENTS:
     return BadArgumentsException;
+  case ZINVALIDSTATE:
+    return InvalidStateException;
   case ZAPIERROR:
     return ApiErrorException;
   case ZNONODE:
@@ -90,7 +92,6 @@ PyObject *err_to_exception(int errcode) {
     return InvalidCallbackException;
   case ZSESSIONMOVED:
     return SessionMovedException;
-      
   case ZOK:
   default:
     return NULL;