summaryrefslogtreecommitdiff
path: root/python/modules/IcePy/BatchRequestInterceptor.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2017-03-16 08:15:47 -0700
committerMark Spruiell <mes@zeroc.com>2017-03-16 08:15:47 -0700
commit847655b81a9473a7013b89a9ad68f358cbec2545 (patch)
treef70d775db4a9c9da80d95ad25b4aeb54011fe1a9 /python/modules/IcePy/BatchRequestInterceptor.cpp
parentFixed (ICE-7621) - Refactor IceSSL API to support multiple implementations (diff)
downloadice-847655b81a9473a7013b89a9ad68f358cbec2545.tar.bz2
ice-847655b81a9473a7013b89a9ad68f358cbec2545.tar.xz
ice-847655b81a9473a7013b89a9ad68f358cbec2545.zip
ICE-7674 - Python batch request interceptor bug
Diffstat (limited to 'python/modules/IcePy/BatchRequestInterceptor.cpp')
-rw-r--r--python/modules/IcePy/BatchRequestInterceptor.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/modules/IcePy/BatchRequestInterceptor.cpp b/python/modules/IcePy/BatchRequestInterceptor.cpp
index 83577944689..a39bfa6bd9c 100644
--- a/python/modules/IcePy/BatchRequestInterceptor.cpp
+++ b/python/modules/IcePy/BatchRequestInterceptor.cpp
@@ -261,8 +261,15 @@ IcePy::BatchRequestInterceptor::enqueue(const Ice::BatchRequest& request, int qu
obj->size = 0;
obj->operation = 0;
obj->proxy = 0;
- PyObjectHandle tmp = PyObject_CallMethod(_interceptor.get(), STRCAST("enqueue"), STRCAST("Oii"), obj, queueCount,
- queueSize);
+ PyObjectHandle tmp;
+ if(PyCallable_Check(_interceptor.get()))
+ {
+ tmp = PyObject_CallFunction(_interceptor.get(), STRCAST("Oii"), obj, queueCount, queueSize);
+ }
+ else
+ {
+ tmp = PyObject_CallMethod(_interceptor.get(), STRCAST("enqueue"), STRCAST("Oii"), obj, queueCount, queueSize);
+ }
Py_DECREF(reinterpret_cast<PyObject*>(obj));
if(!tmp.get())
{