From e1e1212daae33723e7da325f295a5c3a6bb78979 Mon Sep 17 00:00:00 2001 From: Brian McGroarty Date: Wed, 7 May 2008 17:17:42 +0000 Subject: QAR-520 maintenance-7 merge -- svn merge -r 84923:86093 svn+ssh://svn.lindenlab.com/svn/linden/qa/maintenance-7-sandbox-84884 -- dataserver-is-deprecated --- indra/lib/python/indra/base/llsd.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/lib/python') diff --git a/indra/lib/python/indra/base/llsd.py b/indra/lib/python/indra/base/llsd.py index 9e636ea423..76855deb7f 100644 --- a/indra/lib/python/indra/base/llsd.py +++ b/indra/lib/python/indra/base/llsd.py @@ -215,8 +215,12 @@ class LLSDXMLFormatter(object): def format(self, something): return '' + self.elt("llsd", self.generate(something)) +_g_xml_formatter = None def format_xml(something): - return LLSDXMLFormatter().format(something) + global _g_xml_formatter + if _g_xml_formatter is None: + _g_xml_formatter = LLSDXMLFormatter() + return _g_xml_formatter.format(something) class LLSDNotationFormatter(object): def __init__(self): -- cgit v1.2.3