[pytango] 113/483: fixes #3514457

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:30 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 360b9550e45d2aff6a7d01d4a445aa66e643bb6d
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Tue Apr 24 09:46:43 2012 +0000

    fixes #3514457
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@20083 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 PyTango/ipython/ipython_00_10/ipython_00_10.py | 16 +++++-----------
 PyTango/ipython/ipython_00_11/ipython_00_11.py | 16 +++++-----------
 doc/revision.rst                               |  1 +
 3 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/PyTango/ipython/ipython_00_10/ipython_00_10.py b/PyTango/ipython/ipython_00_10/ipython_00_10.py
index 2d93268..e486bf4 100644
--- a/PyTango/ipython/ipython_00_10/ipython_00_10.py
+++ b/PyTango/ipython/ipython_00_10/ipython_00_10.py
@@ -528,17 +528,11 @@ def __exc_handler(ip, etype, value, tb):
 def __get_default_tango_host():
     global _DFT_TANGO_HOST
     if _DFT_TANGO_HOST is None:
-        _DFT_TANGO_HOST = os.environ.get("TANGO_HOST")
-        if _DFT_TANGO_HOST is None:
-            # ok, it must have been defined in the tangorc way. Since the
-            # method Tango::Connection::get_env_var is protected we do a hack to
-            # get the tango_host: Create a temporary Database object. It is not
-            #very nice but is done only once in the lifetime of the application 
-            try:
-                db = PyTango.Database()
-                _DFT_TANGO_HOST = "%s:%s" % (db.get_db_host(), db.get_db_port())
-            except:
-                pass
+        try:
+            db = PyTango.Database()
+            _DFT_TANGO_HOST = "%s:%s" % (db.get_db_host(), db.get_db_port())
+        except:
+            pass
     return _DFT_TANGO_HOST
 
 def __get_db(host_port=None):
diff --git a/PyTango/ipython/ipython_00_11/ipython_00_11.py b/PyTango/ipython/ipython_00_11/ipython_00_11.py
index b17ac94..669a2a4 100644
--- a/PyTango/ipython/ipython_00_11/ipython_00_11.py
+++ b/PyTango/ipython/ipython_00_11/ipython_00_11.py
@@ -520,17 +520,11 @@ def __exc_handler(ip, etype, value, tb, tb_offset=None):
 def __get_default_tango_host():
     global _DFT_TANGO_HOST
     if _DFT_TANGO_HOST is None:
-        _DFT_TANGO_HOST = os.environ.get("TANGO_HOST")
-        if _DFT_TANGO_HOST is None:
-            # ok, it must have been defined in the tangorc way. Since the
-            # method Tango::Connection::get_env_var is protected we do a hack to
-            # get the tango_host: Create a temporary Database object. It is not
-            #very nice but is done only once in the lifetime of the application 
-            try:
-                db = PyTango.Database()
-                _DFT_TANGO_HOST = "%s:%s" % (db.get_db_host(), db.get_db_port())
-            except:
-                pass
+        try:
+            db = PyTango.Database()
+            _DFT_TANGO_HOST = "%s:%s" % (db.get_db_host(), db.get_db_port())
+        except:
+            pass
     return _DFT_TANGO_HOST
 
 def __get_db(host_port=None):
diff --git a/doc/revision.rst b/doc/revision.rst
index c5d3cd8..c65e8cf 100644
--- a/doc/revision.rst
+++ b/doc/revision.rst
@@ -84,6 +84,7 @@ Version history
 |            |         - `3463377: PyTango memory leak in read encoded attribute <https://sourceforge.net/tracker/?func=detail&aid=3463377&group_id=57612&atid=484769>`_                    |
 |            |         - `3487930: [pytango] wrong python dependency <https://sourceforge.net/tracker/?func=detail&aid=3487930&group_id=57612&atid=484769>`_                                |
 |            |         - `3511509: Attribute.set_value_date_quality for encoded does not work <https://sourceforge.net/tracker/?func=detail&aid=3511509&group_id=57612&atid=484769>`_       |
+|            |         - `3514457: [pytango]  TANGO_HOST multi-host support <https://sourceforge.net/tracker/?func=detail&aid=3514457&group_id=57612&atid=484769>`_                         |
 +------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | 7.2.2      | Features:                                                                                                                                                                    |
 |            |     - from sourceforge:                                                                                                                                                      |

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