1
0
mirror of https://github.com/vikstrous/pirate-get synced 2025-01-09 09:59:51 +01:00

give more detail when there is not possible download a torrent file

This commit is contained in:
Augusto Morais 2018-09-14 22:11:29 -03:00
parent d86561b30c
commit 3074abf463

View File

@ -182,7 +182,8 @@ def save_torrents(printer, chosen_links, results, folder):
try:
torrent = get_torrent(info_hash)
except urllib.error.HTTPError:
printer.print('There is no cached file for this torrent :(',
printer.print('There is no cached file for this torrent :('
' \nCode: {} - {}'.format(e.code, e.reason),
color='ERROR')
else:
open(file, 'wb').write(torrent)