From: sgunderson@bigfoot.com <> Date: Sun, 5 Jul 2009 08:22:45 +0000 (+0200) Subject: Patch from xim: Fixed a bug where Unicode strings would not get counted as strings... X-Git-Url: https://git.sesse.net/?p=xml-template;a=commitdiff_plain;h=3410d39314be774eba5ca154e5e9633526dc0508 Patch from xim: Fixed a bug where Unicode strings would not get counted as strings in the Python version. --- diff --git a/python/xmltemplate.py b/python/xmltemplate.py index eb50625..b24d764 100644 --- a/python/xmltemplate.py +++ b/python/xmltemplate.py @@ -8,7 +8,7 @@ def process_file(filename, obj, clean = True): return doc def process(node, obj, clean = True): - if isinstance(obj, str): # overwrite + if isinstance(obj, basestring): # overwrite while not node.firstChild is None: node.removeChild(node.firstChild) doc = _get_document_element(node)