[pytango] 470/483: Get database from Util when possible

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:15:13 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 8901f767a743fc9c2a32a31ca3617fc9520d3bfa
Author: coutinho <coutinho at esrf.fr>
Date:   Fri Apr 17 12:48:42 2015 +0200

    Get database from Util when possible
---
 src/boost/python/server.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/boost/python/server.py b/src/boost/python/server.py
index ad0c1c5..69fbe49 100644
--- a/src/boost/python/server.py
+++ b/src/boost/python/server.py
@@ -1651,8 +1651,11 @@ class Server:
               - dict<device names : tango class name>
         :rtype: tuple<dict, dict>
         """
-        import PyTango
-        db = PyTango.Database()
+        if self.__util is None:
+            import PyTango
+            db = PyTango.Database()
+        else:
+            db = self.__util.get_database()
         server = self.server_instance
         dev_list = db.get_device_class_list(server)
         class_map, dev_map  = {}, {}

-- 
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