summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Communicator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'py/modules/IcePy/Communicator.cpp')
-rw-r--r--py/modules/IcePy/Communicator.cpp13
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