Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
136215a230
2 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  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
   ZOOKEEPER-1048. addauth command does not work in cli_mt/cli_st
   (allengao via michim)
   (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:
 IMPROVEMENTS:
 
 
   ZOOKEEPER-1170. Fix compiler (eclipse) warnings: unused imports,
   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;
     return OperationTimeoutException;
   case ZBADARGUMENTS:
   case ZBADARGUMENTS:
     return BadArgumentsException;
     return BadArgumentsException;
+  case ZINVALIDSTATE:
+    return InvalidStateException;
   case ZAPIERROR:
   case ZAPIERROR:
     return ApiErrorException;
     return ApiErrorException;
   case ZNONODE:
   case ZNONODE:
@@ -90,7 +92,6 @@ PyObject *err_to_exception(int errcode) {
     return InvalidCallbackException;
     return InvalidCallbackException;
   case ZSESSIONMOVED:
   case ZSESSIONMOVED:
     return SessionMovedException;
     return SessionMovedException;
-      
   case ZOK:
   case ZOK:
   default:
   default:
     return NULL;
     return NULL;