From 0ca6674b9e3a31219a00ed46acd4d9421ae1c723 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 14 Apr 2013 18:34:38 +0000 Subject: Pretty print mirrors --- install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install b/install index 342386f..55c40e7 100755 --- a/install +++ b/install @@ -516,7 +516,12 @@ def valid_mirror(mirror): def configure_mirror(): global mirror - items = map(lambda x: '{url} ({info})'.format(url=x[0], info=x[1]), mirrors) + global mirrors + maxlen = 0 + for m in mirrors: + if len(m[0]) > maxlen: + maxlen = len(m[0]) + items = map(lambda x: '{url: <{0}} ({info})'.format(maxlen, url=x[0], info=x[1]), mirrors) items.append(('Enter another mirror', None)) mirror = None while not mirror: -- cgit v1.2.3