diff options
author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-07-24 15:39:56 -0700 |
---|---|---|
committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-07-24 15:39:56 -0700 |
commit | b47dbc2acadb1fa478daf89dbc3d54225c6e4629 (patch) | |
tree | 9bc0cbf4795e1ebdfcb80848fea8ffe092b4983d /indra/lib | |
parent | 9c394b3aaecacc9a70354c544bd728a4f4f966d2 (diff) | |
parent | 90e25f6ba80b773117582d6a392037ac274fff39 (diff) |
Merge with an oldish change of mine
Diffstat (limited to 'indra/lib')
-rw-r--r-- | indra/lib/python/indra/base/llsd.py | 2 | ||||
-rw-r--r-- | indra/lib/python/indra/util/llsubprocess.py | 11 | ||||
-rw-r--r-- | indra/lib/python/indra/util/named_query.py | 4 |
3 files changed, 14 insertions, 3 deletions
diff --git a/indra/lib/python/indra/base/llsd.py b/indra/lib/python/indra/base/llsd.py index 1190d88663..4527b115f9 100644 --- a/indra/lib/python/indra/base/llsd.py +++ b/indra/lib/python/indra/base/llsd.py @@ -238,7 +238,7 @@ class LLSDXMLFormatter(object): def MAP(self, v): return self.elt( 'map', - ''.join(["%s%s" % (self.elt('key', key), self.generate(value)) + ''.join(["%s%s" % (self.elt('key', self.xml_esc(str(key))), self.generate(value)) for key, value in v.items()])) typeof = type diff --git a/indra/lib/python/indra/util/llsubprocess.py b/indra/lib/python/indra/util/llsubprocess.py index c4c40739ec..7e0e115d14 100644 --- a/indra/lib/python/indra/util/llsubprocess.py +++ b/indra/lib/python/indra/util/llsubprocess.py @@ -90,6 +90,17 @@ all the output, and get the result. child.tochild.close() result = child.poll() if result != -1: + # At this point, the child process has exited and result + # is the return value from the process. Between the time + # we called select() and poll() the process may have + # exited so read all the data left on the child process + # stdout and stderr. + last = child.fromchild.read() + if last: + out.append(last) + last = child.childerr.read() + if last: + err.append(last) child.tochild.close() child.fromchild.close() child.childerr.close() diff --git a/indra/lib/python/indra/util/named_query.py b/indra/lib/python/indra/util/named_query.py index 693b483f79..5c19368240 100644 --- a/indra/lib/python/indra/util/named_query.py +++ b/indra/lib/python/indra/util/named_query.py @@ -48,8 +48,8 @@ from indra.base import llsd from indra.base import config DEBUG = False -NQ_FILE_SUFFIX = None -NQ_FILE_SUFFIX_LEN = None +NQ_FILE_SUFFIX = config.get('named-query-file-suffix', '.nq') +NQ_FILE_SUFFIX_LEN = len(NQ_FILE_SUFFIX) _g_named_manager = None |