1. cherrypy
  2. CherryPy

Commits

Robert Brewer  committed b95db0f

Moved mimetools to only import if needed.

  • Participants
  • Parent commits a6f091c
  • Branches default

Comments (0)

Files changed (1)

File cherrypy/lib/static.py

View file
-import mimetools
 import mimetypes
 mimetypes.init()
 mimetypes.types_map['.dwg']='image/x-dwg'
             else:
                 # Return a multipart/byteranges response.
                 response.status = "206 Partial Content"
+                import mimetools
                 boundary = mimetools.choose_boundary()
                 ct = "multipart/byteranges; boundary=%s" % boundary
                 response.headers['Content-Type'] = ct