Fixed a Python 2.4 incompatibility in `compress_kml`.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Justin Bronn 2008-12-08 14:50:06 +00:00
parent 6590c0bcf5
commit bde736cc5a
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ from django.template import loader
def compress_kml(kml): def compress_kml(kml):
"Returns compressed KMZ from the given KML string." "Returns compressed KMZ from the given KML string."
kmz = cStringIO.StringIO() kmz = cStringIO.StringIO()
zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED, False) zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED)
zf.writestr('doc.kml', kml) zf.writestr('doc.kml', kml)
zf.close() zf.close()
kmz.seek(0) kmz.seek(0)