From b2537c605b2ad0e6b04bf1534d569f91f30f1594 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 25 Oct 2009 01:16:28 -0400 Subject: [PATCH] Fixed a bug where the Document open/close tags were not output with to_kml(). --- src/KML.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/KML.py b/src/KML.py index f96adb2..3279c85 100644 --- a/src/KML.py +++ b/src/KML.py @@ -32,17 +32,17 @@ class KmlObject(object): def to_kml(self): - return self.render() + kml = self.OPEN_TAG + kml += self.render() + kml += self.CLOSE_TAG + "\n" + return kml def render(self): - kml = self.OPEN_TAG - kml += escape(self.text) + kml = escape(self.text) for c in self.children: kml += c.to_kml() - - kml += self.CLOSE_TAG + "\n" return kml @@ -75,7 +75,7 @@ class Document(KmlObject): """ CLOSE_TAG = """ - """ +""" def __init__(self, initial_text=''): super(Document, self).__init__(initial_text) -- 2.44.2