[pytango] 455/483: Put databaseds argument as optional in the main function

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:15:12 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 93ddef345b7c139acc35ee91f719bb905aecf6f2
Author: Sébastien Petitdemange <sebastien.petitdemange at esrf.fr>
Date:   Tue Mar 31 13:10:52 2015 +0200

    Put databaseds argument as optional in the main function
---
 src/boost/python/databaseds/database.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/boost/python/databaseds/database.py b/src/boost/python/databaseds/database.py
index b06224c..5101c41 100644
--- a/src/boost/python/databaseds/database.py
+++ b/src/boost/python/databaseds/database.py
@@ -1742,7 +1742,7 @@ def DbExportDevice(self, argin):
     self.db.export_device(dev_name, IOR, host, pid, version)
 
 
-def main():
+def main(argv = None):
     #Parameters management
     global options
     if argparse:
@@ -1754,7 +1754,7 @@ def main():
         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('argv',nargs=argparse.REMAINDER)
-        options = parser.parse_args()
+        options = parser.parse_args(argv)
         options.argv = ["DataBaseds"] + options.argv
     else:
         parser = OptionParser()
@@ -1764,7 +1764,7 @@ def main():
                           help="logging_level 0:WARNING,1:INFO,2:DEBUG")
         parser.add_option("-e","--embedded",dest="embedded",default=False,
                           action="store_true")
-        (options,args) = parser.parse_args()
+        (options,args) = parser.parse_args(argv)
         options.argv = ["DataBaseds"] + args
 
     log_fmt = '%(threadName)-14s %(levelname)-8s %(asctime)s %(name)s: %(message)s'

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