summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Communicator.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-06-09 03:11:15 +0000
committerBernard Normier <bernard@zeroc.com>2006-06-09 03:11:15 +0000
commit0dbfa916d15163f42026fec37c71a998b96932d2 (patch)
tree1361809f4464bd5669884b2b49c4a4bd66e54006 /py/modules/IcePy/Communicator.cpp
parentUse better initialize (diff)
downloadice-0dbfa916d15163f42026fec37c71a998b96932d2.tar.bz2
ice-0dbfa916d15163f42026fec37c71a998b96932d2.tar.xz
ice-0dbfa916d15163f42026fec37c71a998b96932d2.zip
Added support for the args-less initialize()
Diffstat (limited to 'py/modules/IcePy/Communicator.cpp')
-rw-r--r--py/modules/IcePy/Communicator.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp
index f5c53e4e95e..51d52015dc4 100644
--- a/py/modules/IcePy/Communicator.cpp
+++ b/py/modules/IcePy/Communicator.cpp
@@ -95,6 +95,11 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/)
return -1;
}
+ //
+ // Use the with-args or the without-args version of initialize()?
+ //
+ bool hasArgs = !seq.empty();
+
Ice::InitializationData data;
if(initData)
{
@@ -158,7 +163,14 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/)
Ice::CommunicatorPtr communicator;
try
{
- communicator = Ice::initialize(argc, argv, data);
+ if(hasArgs)
+ {
+ communicator = Ice::initialize(argc, argv, data);
+ }
+ else
+ {
+ communicator = Ice::initialize(data);
+ }
}
catch(const Ice::Exception& ex)
{