From 095f2d2b38c8ffca7b3a181d0a755c2a95cb6e58 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sun, 24 Nov 2019 11:02:50 +0100 Subject: [PATCH] show the reason in case of the mirror failure --- pirate/pirate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pirate/pirate.py b/pirate/pirate.py index 3a992f0..7e7286b 100755 --- a/pirate/pirate.py +++ b/pirate/pirate.py @@ -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')