Fix1: Package upload using Python3 was still broken:
[osm/osmclient.git] / osmclient / sol005 / http.py
index 4debf0d..867db2d 100644 (file)
@@ -17,9 +17,7 @@
 from io import BytesIO
 import pycurl
 import json
-import yaml
 from osmclient.common import http
-from osmclient.common.exceptions import ClientException
 
 class Http(http.Http):
 
@@ -76,7 +74,7 @@ class Http(http.Http):
                            (pycurl.FORM_FILE,
                             formfile[1])))])
         elif filename is not None:
-            with open(filename, 'r') as stream:
+            with open(filename, 'rb') as stream:
                 postdata=stream.read()
             curl_cmd.setopt(pycurl.POSTFIELDS, postdata)