From b5cd01652e1ccbc6c3416df88ac66d2cfcbc0a76 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 11 Jun 2012 20:28:54 +0000 Subject: utils/get_ubuntu_mirrors_from_lp.py: move this script to python3 --- utils/get_ubuntu_mirrors_from_lp.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'utils') diff --git a/utils/get_ubuntu_mirrors_from_lp.py b/utils/get_ubuntu_mirrors_from_lp.py index ed0ee936..5f9325e4 100755 --- a/utils/get_ubuntu_mirrors_from_lp.py +++ b/utils/get_ubuntu_mirrors_from_lp.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # get_ubuntu_lp_mirrors.py # @@ -40,9 +40,8 @@ for entry in d.entries: countries[countrycode].add(link.href) -keys = countries.keys() -keys.sort() -print "mirror://mirrors.ubuntu.com/mirrors.txt" +keys = sorted(countries.keys()) +print("mirror://mirrors.ubuntu.com/mirrors.txt") for country in keys: - print "#LOC:%s" % country - print "\n".join(sorted(countries[country])) + print("#LOC:%s" % country) + print("\n".join(sorted(countries[country]))) -- cgit v1.2.3 From 6b2a358bb63c6b51b6a1215b047ea879046fd965 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 11 Jun 2012 14:20:54 -0700 Subject: drop the unnecessary use of .keys() here, thanks Barry\! --- utils/get_ubuntu_mirrors_from_lp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/get_ubuntu_mirrors_from_lp.py b/utils/get_ubuntu_mirrors_from_lp.py index 5f9325e4..7c4d3831 100755 --- a/utils/get_ubuntu_mirrors_from_lp.py +++ b/utils/get_ubuntu_mirrors_from_lp.py @@ -40,7 +40,7 @@ for entry in d.entries: countries[countrycode].add(link.href) -keys = sorted(countries.keys()) +keys = sorted(countries) print("mirror://mirrors.ubuntu.com/mirrors.txt") for country in keys: print("#LOC:%s" % country) -- cgit v1.2.3