Fixed import needed to serve zip files which broke because of other changes.
authorThomas Arendsen Hein <thomas@intevation.de>
Tue, 30 Aug 2005 19:12:17 +0200
changeset 1165 04be5eb73bb3
parent 1164 cf8185cf2a70
child 1166 bd66294b7a9b
Fixed import needed to serve zip files which broke because of other changes.
mercurial/hgweb.py
--- a/mercurial/hgweb.py
+++ b/mercurial/hgweb.py
@@ -663,10 +663,10 @@ class hgweb:
         files.sort()
 
         if type == 'zip':
-            import zipfile
+            import zipfile, tempfile
 
+            tmp = tempfile.mkstemp()[1]
             try:
-                tmp = tempfile.mkstemp()[1]
                 zf = zipfile.ZipFile(tmp, "w", zipfile.ZIP_DEFLATED)
 
                 for f in files: