diff options
Diffstat (limited to 'py')
-rw-r--r-- | py/CHANGES | 2 | ||||
-rw-r--r-- | py/modules/IcePy/Communicator.cpp | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/py/CHANGES b/py/CHANGES index 67e7664f364..acf8089d59b 100644 --- a/py/CHANGES +++ b/py/CHANGES @@ -13,6 +13,8 @@ Changes since version 3.2.X (binary incompatible) Changes since version 3.2.0 --------------------------- +- Fixed Communicator.isShutdown, which always returned false. + - Added support for protected class data members using the new metadata tag ["protected"]. The tag can be applied to a Slice class or to individual data members. diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp index c21c05750cc..e6e5fe50c55 100644 --- a/py/modules/IcePy/Communicator.cpp +++ b/py/modules/IcePy/Communicator.cpp @@ -408,9 +408,10 @@ static PyObject* communicatorIsShutdown(CommunicatorObject* self) { assert(self->communicator); + bool isShutdown; try { - (*self->communicator)->isShutdown(); + isShutdown = (*self->communicator)->isShutdown(); } catch(const Ice::Exception& ex) { @@ -418,8 +419,14 @@ communicatorIsShutdown(CommunicatorObject* self) return 0; } - Py_INCREF(Py_None); - return Py_None; + if(isShutdown) + { + PyRETURN_TRUE; + } + else + { + PyRETURN_FALSE; + } } #ifdef WIN32 |