mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-09 09:59:51 +01:00
show the reason in case of the mirror failure
This commit is contained in:
parent
6642130fc5
commit
095f2d2b38
@ -259,8 +259,9 @@ def connect_mirror(mirror, printer, args):
|
||||
mode=args.action,
|
||||
terms=args.search,
|
||||
mirror=mirror)
|
||||
except (urllib.error.URLError, socket.timeout, IOError, ValueError):
|
||||
printer.print('Failed', color='WARN')
|
||||
except (urllib.error.URLError, socket.timeout, IOError, ValueError) as e:
|
||||
printer.print('Failed', color='WARN', end=' ')
|
||||
printer.print('(', e, ')', sep='')
|
||||
return None
|
||||
else:
|
||||
printer.print('Ok', color='alt')
|
||||
|
Loading…
Reference in New Issue
Block a user