From 33ce57b485fbaf76ef203fb11288c12fdbd58b2c Mon Sep 17 00:00:00 2001 From: Aaron Brashears Date: Wed, 19 Sep 2007 16:59:05 +0000 Subject: Result of svn merge -r68268:69863 svn+ssh://svn/svn/linden/branches/entity-router into release. --- indra/lib/python/indra/ipc/llsdhttp.py | 1 - indra/lib/python/indra/ipc/servicebuilder.py | 2 +- indra/lib/python/indra/util/named_query.py | 8 ++++++-- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/lib') diff --git a/indra/lib/python/indra/ipc/llsdhttp.py b/indra/lib/python/indra/ipc/llsdhttp.py index fbe08ad7fc..cffff6b24b 100644 --- a/indra/lib/python/indra/ipc/llsdhttp.py +++ b/indra/lib/python/indra/ipc/llsdhttp.py @@ -8,7 +8,6 @@ $License$ import os.path import os -import os import urlparse diff --git a/indra/lib/python/indra/ipc/servicebuilder.py b/indra/lib/python/indra/ipc/servicebuilder.py index c2490593c3..05de1ee5c5 100644 --- a/indra/lib/python/indra/ipc/servicebuilder.py +++ b/indra/lib/python/indra/ipc/servicebuilder.py @@ -23,7 +23,7 @@ def build(name, context): global _g_builder if _g_builder is None: _g_builder = ServiceBuilder() - _g_builder.buildServiceURL(name, context) + return _g_builder.buildServiceURL(name, context) class ServiceBuilder(object): def __init__(self, services_definition = services_config): diff --git a/indra/lib/python/indra/util/named_query.py b/indra/lib/python/indra/util/named_query.py index 6e72f9be88..f6c9c01553 100644 --- a/indra/lib/python/indra/util/named_query.py +++ b/indra/lib/python/indra/util/named_query.py @@ -56,11 +56,15 @@ class ExpectationFailed(Exception): self.message = message class NamedQuery(object): - def __init__(self, filename): + def __init__(self, name, filename): self._stat_interval = 5000 # 5 seconds + self._name = name self._location = filename self.load_contents() + def name(self): + return self._name + def get_modtime(self): return os.path.getmtime(self._location) @@ -186,6 +190,6 @@ class NamedQueryManager(object): # new up/refresh a NamedQuery based on the name nq = self._cached_queries.get(name) if nq is None: - nq = NamedQuery(os.path.join(self._dir, name)) + nq = NamedQuery(name, os.path.join(self._dir, name)) self._cached_queries[name] = nq return nq -- cgit v1.2.3