cenkalti / putio.py

A python wrapper for put.io APIv2
http://put.io
MIT License
72 stars 41 forks source link

torrent: use mode 'rb' when reading torrent files #11

Closed posborne closed 8 years ago

posborne commented 8 years ago

The default mode when calling open is 'r'. This is fine on most platforms but on Windows, files must be opened with 'rb' to avoid problems when reading binary files (like .torrent files).

Without this change, torrent files added on Windows are frequently truncated when being sent leading to an HTTP 400 error from the put.io web service.

Signed-off-by: Paul Osborne osbpau@gmail.com