couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woh...@apache.org
Subject [couchdb] branch upload-failed-logfiles updated: support ancient versions of requests library
Date Thu, 11 May 2017 00:21:52 GMT
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch upload-failed-logfiles
in repository https://gitbox.apache.org/repos/asf/couchdb.git

The following commit(s) were added to refs/heads/upload-failed-logfiles by this push:
       new  a295a70   support ancient versions of requests library
a295a70 is described below

commit a295a707dffbe34d8d1503a551b66fcd1a97e762
Author: Joan Touzet <joant@atypical.net>
AuthorDate: Wed May 10 20:21:36 2017 -0400

    support ancient versions of requests library
---
 build-aux/logfile-uploader.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/build-aux/logfile-uploader.py b/build-aux/logfile-uploader.py
index 7c11a76..4555cdc 100755
--- a/build-aux/logfile-uploader.py
+++ b/build-aux/logfile-uploader.py
@@ -89,11 +89,13 @@ def upload_logs():
     req.raise_for_status()
     req = _tojson(req)
     with open(TARFILE, 'rb') as f:
+        # ancient versions of requests break if data is iterable
+        fdata = f.read()
         req2 = requests.put(COUCH_URL + '/' + doc['_id'] + '/' + TARFILE,
             headers={'Content-type': 'application/x-gtar'},
             auth=creds,
             params={'rev': req['rev']},
-            data=f)
+            data=fdata)
     req2.raise_for_status()
     return req2
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message