Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 9fba6f2

Browse files
committed
Try a Python 3.4 exception for pulling the data out of the request
1 parent 26d987a commit 9fba6f2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

documentcloud/MultipartPostHandler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ class MultipartPostHandler(urllib.request.BaseHandler):
6565
handler_order = urllib.request.HTTPHandler.handler_order - 10
6666

6767
def http_request(self, request):
68-
data = request.get_data()
68+
try:
69+
data = request.get_data()
70+
except AttributeError:
71+
data = request.data
6972
if data is not None and type(data) != str:
7073
v_files = []
7174
v_vars = []

0 commit comments

Comments
 (0)