Commits

Alexander Ljungberg  committed 7cace08

Made universal request.data change compatible with Python <2.5.

  • Participants
  • Parent commits 4b24b73

Comments (0)

Files changed (1)

File piston/resource.py

             except MimerDataException:
                 return rc.BAD_REQUEST
             if not hasattr(request, 'data'):
-                request.data = request.POST if rm == 'POST' else request.PUT
+                if rm == 'POST':
+                    request.data = request.POST
+                else:
+                    request.data = request.PUT
 
         if not rm in handler.allowed_methods:
             return HttpResponseNotAllowed(handler.allowed_methods)