MestreLion / humblebundle

API for managing Humble Bundle games library
GNU General Public License v3.0
211 stars 38 forks source link

Fixes wrong MD5 when downloading torrent file. #12

Closed Pfeil closed 8 years ago

Pfeil commented 8 years ago

Implements a workaround (do not check MD5 when downloading a torrent file) to avoid a misleading error message and a wrong exit status when using -b with --download. The problem is caused by the humble bundle API, which gives an MD5 not for the torrent file, but the normal download. Since the integrity of a Bittorrent download is ensured by the Bittorrent protocol, this MD5 is not useful here. So the workaround is to set the MD5 to None when using -b. Unfortunately, this way, the integrity of the .torrent file can not be ensured.

In case you have suggestions for a better solution or a better style, please tell me. This was just a fast fix, fitting my needs.

MestreLion commented 8 years ago

Thanks! I modified the coding style a bit, but gave you full credits for the commit.