mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-10 10:04:21 +01:00
give more detail when there is not possible download a torrent file
This commit is contained in:
parent
d86561b30c
commit
3074abf463
@ -182,7 +182,8 @@ def save_torrents(printer, chosen_links, results, folder):
|
|||||||
try:
|
try:
|
||||||
torrent = get_torrent(info_hash)
|
torrent = get_torrent(info_hash)
|
||||||
except urllib.error.HTTPError:
|
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')
|
color='ERROR')
|
||||||
else:
|
else:
|
||||||
open(file, 'wb').write(torrent)
|
open(file, 'wb').write(torrent)
|
||||||
|
Loading…
Reference in New Issue
Block a user