import uuid
from os.path import splitext
-from webob import Response
+from werkzeug.datastructures import FileStorage
from werkzeug.exceptions import BadRequest, Forbidden
from werkzeug.utils import secure_filename
-from werkzeug.datastructures import FileStorage
+from werkzeug.wrappers import Response
from celery import registry
from mediagoblin.db.util import ObjectId
'username': request.user.username,
'email': request.user.email}
+ # TODO: This is the *only* thing using Response() here, should that
+ # not simply use json_response()?
return Response(json.dumps(user_data))
def process_response(self, request, response):
# All following tests should be for html only!
- if response.content_type != "text/html":
+ if getattr(response, 'content_type', None) != "text/html":
# Get out early
return