diff MoinMoin/support/werkzeug/test.py @ 4627:c404a1295318

updated werkzeug
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 05 Mar 2009 23:01:03 +0100
parents 159902268129
children 06a744121699
line wrap: on
line diff
--- a/MoinMoin/support/werkzeug/test.py	Mon Mar 02 02:09:10 2009 +0100
+++ b/MoinMoin/support/werkzeug/test.py	Thu Mar 05 23:01:03 2009 +0100
@@ -10,13 +10,13 @@
 """
 import sys
 import urlparse
+import mimetypes
 from time import time
 from random import random
 from itertools import chain
 from tempfile import TemporaryFile
 from cStringIO import StringIO
 from cookielib import CookieJar
-from mimetypes import guess_type
 from urllib2 import Request as U2Request
 
 from werkzeug._internal import _empty_stream
@@ -69,8 +69,9 @@
                                    getattr(value, 'name', None))
                 content_type = getattr(value, 'content_type', None)
                 if content_type is None:
-                    content_type = filename and guess_type(filename)[0] or \
-                                   'application/octet-stream'
+                    content_type = filename and \
+                        mimetypes.guess_type(filename)[0] or \
+                        'application/octet-stream'
                 if filename is not None:
                     write('; filename="%s"\r\n' % filename)
                 else: