mirror of https://github.com/django/django.git
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:
parent
6590c0bcf5
commit
bde736cc5a
|
@ -5,7 +5,7 @@ from django.template import loader
|
|||
def compress_kml(kml):
|
||||
"Returns compressed KMZ from the given KML string."
|
||||
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.close()
|
||||
kmz.seek(0)
|
||||
|
|
Loading…
Reference in New Issue