From: Michael Orlitzky Date: Sun, 25 Oct 2009 22:11:24 +0000 (-0400) Subject: Merged branch 'master' with the to_kml() fix. X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=2c1d45fac5f57867d6cf7f4e19628a67aae8a055;hp=036e4f51e67820e245ae761b5cdf1169ab3b2c36;p=dead%2Fcensus-tools.git Merged branch 'master' with the to_kml() fix. --- diff --git a/src/KML.py b/src/KML.py index 1f42898..26e8e71 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)