mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-09 09:59:51 +01:00
Merge pull request #123 from moraisaugusto/improve_error
give more detail on error
This commit is contained in:
commit
7b2d0795cf
@ -181,8 +181,9 @@ 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 as e:
|
||||||
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