From fd4f333ae57e3876543d6d44be554b6ec783402d Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Wed, 3 Jan 2007 18:01:31 +0100 Subject: * also parse te location of a Debian mirror in the helper script * update the Debian mirrors file with location infromation --- utils/get_debian_mirrors.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/get_debian_mirrors.py b/utils/get_debian_mirrors.py index 5964de72..f722e82d 100755 --- a/utils/get_debian_mirrors.py +++ b/utils/get_debian_mirrors.py @@ -37,16 +37,21 @@ list_path = "../data/templates/Debian.mirrors" req = urllib2.Request("http://www.debian.org/mirror/mirrors_full") match = re.compile("^.*>([A-Za-z0-9-.\/_]+)<\/a>.*\n$") +match_location = re.compile('^.*') def add_sites(line, proto, sites, mirror_type): path = match.sub(r"\1", line) for site in sites: - mirror_type.append("%s://%s%s" % (proto, site.lstrip(), path)) + mirror_type.append("%s://%s%s\n" % (proto, site.lstrip(), path)) try: print "Downloading mirrors list from the Debian website..." uri=urllib2.urlopen(req) for line in uri.readlines(): + if line.startswith('