summaryrefslogtreecommitdiff
path: root/SoftwareProperties
diff options
context:
space:
mode:
authorglatzor@ubuntu.com <>2006-09-02 11:51:49 +0200
committerglatzor@ubuntu.com <>2006-09-02 11:51:49 +0200
commitb139b31fd1adc363d59338b45b7c82dcec51d44b (patch)
tree688ce53f51c39e34c496763b4392b92dbaa393fa /SoftwareProperties
parenta53e49c46faae31eccd7e65b8ffbcb91fbcaf18a (diff)
parent650cb474d23914be801af09d5f9c31cfc9765b07 (diff)
downloadpython-apt-b139b31fd1adc363d59338b45b7c82dcec51d44b.tar.gz
* merge with mvo
Diffstat (limited to 'SoftwareProperties')
-rw-r--r--SoftwareProperties/SoftwareProperties.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index 8ae98b55..38b55ef5 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -305,11 +305,12 @@ class SoftwareProperties(SimpleGladeApp):
for server in self.distro.used_servers:
if not re.match(server, self.distro.main_server) and \
not re.match(server, self.distro.nearest_server):
- #FIXME: an ubuntu hack
- i = server.find("http://")
+ # FIXME: use regexp here instead of this
+ country = ""
+ i = server.find("://")
l = server.find(".archive.ubuntu.com")
if i != -1 and l != -1:
- country = server[i+7:l]
+ country = server[i+len("://"):l]
if self.distro.countries.has_key(country):
# TRANSLATORS: %s is a country
server_store.append([_("Server for %s") % \