diff options
author | Michi Henning <michi@zeroc.com> | 2007-06-22 16:36:14 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2007-06-22 16:36:14 +1000 |
commit | 33c7f4c5a8ff50f5c67757eda12e4092c98c818e (patch) | |
tree | f7013c9a1a81177c798d5da436fefd64dd3def4d /py/modules/IcePy/Communicator.cpp | |
parent | bug 2157 - deprecating LocalObject mapping (diff) | |
download | ice-33c7f4c5a8ff50f5c67757eda12e4092c98c818e.tar.bz2 ice-33c7f4c5a8ff50f5c67757eda12e4092c98c818e.tar.xz ice-33c7f4c5a8ff50f5c67757eda12e4092c98c818e.zip |
Bug 2265.
Diffstat (limited to 'py/modules/IcePy/Communicator.cpp')
-rw-r--r-- | py/modules/IcePy/Communicator.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
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 |