[pytango] 174/483: fixes #3586337
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.
commit 35aa63c12dc2daeac4c86818cc12af4a9c88a609
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Mon Nov 12 11:22:48 2012 +0000
fixes #3586337
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@21564 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
src/server/device_class.cpp | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/server/device_class.cpp b/src/server/device_class.cpp
index 7c203b9..d5b8033 100644
--- a/src/server/device_class.cpp
+++ b/src/server/device_class.cpp
@@ -180,12 +180,23 @@ void CppDeviceClassWrap::attribute_factory(std::vector<Tango::Attr *> &att_list)
//
// make sure we pass the same vector object to the python method
//
+ AutoPythonGIL python_guard;
+
object py_att_list(
handle<>(
to_python_indirect<
std::vector<Tango::Attr *>,
detail::make_reference_holder>()(att_list)));
- CALL_DEVCLASS_METHOD_VARGS(_DeviceClass__attribute_factory, py_att_list)
+
+ try
+ {
+ boost::python::call_method<void>(m_self, "_DeviceClass__attribute_factory",
+ py_att_list);
+ }
+ catch(boost::python::error_already_set &eas)
+ {
+ handle_python_exception(eas);
+ }
}
void CppDeviceClassWrap::command_factory()
@@ -198,12 +209,22 @@ void CppDeviceClassWrap::device_name_factory(std::vector<std::string> &dev_list)
//
// make sure we pass the same vector object to the python method
//
+ AutoPythonGIL python_guard;
+
object py_dev_list(
handle<>(
to_python_indirect<
std::vector<std::string>,
detail::make_reference_holder>()(dev_list)));
- CALL_DEVCLASS_METHOD_VARGS(device_name_factory, py_dev_list);
+ try
+ {
+ boost::python::call_method<void>(m_self, "device_name_factory",
+ py_dev_list);
+ }
+ catch(boost::python::error_already_set &eas)
+ {
+ handle_python_exception(eas);
+ }
}
void CppDeviceClassWrap::device_factory(const Tango::DevVarStringArray *dev_list)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list