diff options
author | Kartic Krishnamurthy <drunkensufi@lindenlab.com> | 2008-05-06 20:26:22 +0000 |
---|---|---|
committer | Kartic Krishnamurthy <drunkensufi@lindenlab.com> | 2008-05-06 20:26:22 +0000 |
commit | 41927004751731d2d0cb74989ded36878292ee4e (patch) | |
tree | 56b3723fed44031e888de9019b1ad127acdb1806 /indra | |
parent | 068da0b5655fc3c735cd8019ab3b6bb0defec4c0 (diff) |
svn merge -r86582:86825 svn+ssh://svn/svn/linden/branches/nq-extension-for-merge-1 .
Original Jira: https://jira.lindenlab.com/browse/DEV-11178 (Proposal: To rename named query files to take an extension .nq)
Sandbox Jira: https://jira.lindenlab.com/browse/QAR-470 (Test a massive rename of named query files from being extensionless to having a .nq extension)
Merge Buildme: https://jira.lindenlab.com/browse/QAR-473
Original Code Review: BillC
Diffstat (limited to 'indra')
-rw-r--r-- | indra/lib/python/indra/util/named_query.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/lib/python/indra/util/named_query.py b/indra/lib/python/indra/util/named_query.py index 471998388d..17f25f46d2 100644 --- a/indra/lib/python/indra/util/named_query.py +++ b/indra/lib/python/indra/util/named_query.py @@ -47,6 +47,9 @@ except NameError: from indra.base import llsd from indra.base import config +NQ_FILE_SUFFIX = config.get('named-query-file-suffix', '') +NQ_FILE_SUFFIX_LEN = len(NQ_FILE_SUFFIX) + _g_named_manager = None def _init_g_named_manager(sql_dir = None): @@ -98,6 +101,9 @@ class NamedQuery(object): a path to a file containing an llsd named query document.""" self._stat_interval_seconds = 5 # 5 seconds self._name = name + if (filename is not None) \ + and (NQ_FILE_SUFFIX != filename[-NQ_FILE_SUFFIX_LEN:]): + filename = filename + NQ_FILE_SUFFIX self._location = filename self._alternative = dict() self._last_mod_time = 0 |