[pytango] 447/483: Add an option for database plugin to avoid wild card replacement

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:15:11 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 f20ad7e4b0160157b850be2e02839cd5340143f7
Author: Sébastien Petitdemange <sebastien.petitdemange at esrf.fr>
Date:   Tue Mar 17 09:43:27 2015 +0100

    Add an option for database plugin to avoid wild card replacement
---
 src/boost/python/databaseds/database.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/boost/python/databaseds/database.py b/src/boost/python/databaseds/database.py
index da9944a..14b1ed2 100644
--- a/src/boost/python/databaseds/database.py
+++ b/src/boost/python/databaseds/database.py
@@ -51,7 +51,8 @@ from PyTango.globals import get_class, get_class_by_class, \
 
 #Argument Options
 global options
-
+global WILDCARD_REPLACEMENT
+WILDCARD_REPLACEMENT = True
 class DbInter(PyTango.Interceptors):
 
     def create_thread(self):
@@ -97,6 +98,8 @@ def check_device_name(dev_name):
     return True, dev_name, dfm
 
 def replace_wildcard(text):
+    if not WILDCARD_REPLACEMENT:
+        return text
     # escape '%' with '\'
     text = text.replace("%", "\\%")
     # escape '_' with '\'
@@ -192,7 +195,11 @@ class DataBase (PyTango.Device_4Impl):
         m = __import__('db_access.%s' % (options.db_access),None,None,
                        'db_access.%s' % (options.db_access))
         self.db = m.get_db()
-
+        try:
+            global WILDCARD_REPLACEMENT
+            WILDCARD_REPLACEMENT = m.get_wildcard_replacement()
+        except AttributeError:
+            pass
         self.set_state(PyTango.DevState.ON)
 
         #----- PROTECTED REGION END -----#	//	DataBase.init_device

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