[pytango] 52/483: fix problem with switchdb
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:23 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 6b955c03e7290cfad493416ffe6f7f7e9be1b990
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Mon Nov 7 09:55:41 2011 +0000
fix problem with switchdb
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@18300 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
PyTango/ipython/ipython_00_11/ipython_00_11.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/PyTango/ipython/ipython_00_11/ipython_00_11.py b/PyTango/ipython/ipython_00_11/ipython_00_11.py
index 5aa0c73..ea5ca7e 100644
--- a/PyTango/ipython/ipython_00_11/ipython_00_11.py
+++ b/PyTango/ipython/ipython_00_11/ipython_00_11.py
@@ -546,7 +546,8 @@ def __get_db(host_port=None):
host_port = host_port.strip().replace(" ",":")
if host_port.count(":") == 0:
host_port += ":10000"
-
+ host_port = str(host_port)
+
if db is None:
create_db = True
elif host_port is None:
@@ -560,10 +561,10 @@ def __get_db(host_port=None):
db = PyTango.Database(*host_port.split(":"))
ip.user_ns["DB_NAME"] = host_port
- except Exception:
- print
+ except Exception, e:
if db:
- print "Could not access Database", host_port
+ print "Could not access Database %s:" % host_port
+ print str(e)
old_host_port = "%s:%s" % (db.get_db_host(), db.get_db_port())
print "Maintaining connection to Database", old_host_port
ip.user_ns["DB_NAME"] = old_host_port
--
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