summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/lib/python/indra/ipc/llsdhttp.py1
-rw-r--r--indra/lib/python/indra/ipc/servicebuilder.py2
-rw-r--r--indra/lib/python/indra/util/named_query.py8
3 files changed, 7 insertions, 4 deletions
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