[pytango] 463/483: Add port parameter

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 bb0648d5b968092be521c441c3fcd7c379e43dd6
Author: coutinho <coutinho at esrf.fr>
Date:   Tue Apr 14 13:59:12 2015 +0200

    Add port parameter
---
 src/boost/python/databaseds/database.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/boost/python/databaseds/database.py b/src/boost/python/databaseds/database.py
index e457f1f..c8ba602 100644
--- a/src/boost/python/databaseds/database.py
+++ b/src/boost/python/databaseds/database.py
@@ -1753,6 +1753,8 @@ def main(argv = None):
                             action="store_true")
         parser.add_argument("--logging_level","-l",dest="logging_level",type=int,
                             default=0,help="logging_level 0:WARNING,1:INFO,2:DEBUG")
+        parser.add_argument("--port",dest="port",default=None, type=int,
+                            help="database port")
         parser.add_argument('argv',nargs=argparse.REMAINDER)
         options = parser.parse_args(argv)
         options.argv = ["DataBaseds"] + options.argv
@@ -1764,9 +1766,20 @@ def main(argv = None):
                           help="logging_level 0:WARNING,1:INFO,2:DEBUG")
         parser.add_option("-e","--embedded",dest="embedded",default=False,
                           action="store_true")
+        parser.add_option("--port",dest="port",default=10000, type=int,
+                          help="database port")
         (options,args) = parser.parse_args(argv)
         options.argv = ["DataBaseds"] + args
 
+    port = options.port
+    if port is None:
+        try:
+            _, port = PyTango.ApiUtil.get_env_var("TANGO_HOST").split(":")
+        except:
+            port = 10000
+
+    options.argv += ["-ORBendPoint", "giop:tcp::{0}".format(port)]
+
     log_fmt = '%(threadName)-14s %(levelname)-8s %(asctime)s %(name)s: %(message)s'
     if options.logging_level == 1:
         logging_level = logging.INFO

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