cenkalti / putio.py

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

calling `add_torrent` with an invalid torrent file throws #35

Closed Thinkscape closed 6 years ago

Thinkscape commented 6 years ago

After calling add_torrent() with a non-torrent file:

KeyError: 'transfer'

The docs state the transfer field is optional:

If the file is a torrent file, a transfer object is returned

I believe the lib should not return the field if it's missing (not throw) or otherwise allow handling of torrent files that have been rejected by put.io backend.

See also datashaman/putio-automator#15