summaryrefslogtreecommitdiff
path: root/SoftwareProperties
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-08-24 12:12:57 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-08-24 12:12:57 +0200
commita9edef04412f95f3c2bc6da10388673c695a6ac3 (patch)
tree859c5e42356c2ecc04b5399b5aaa6161b0e32290 /SoftwareProperties
parentb43c15172606b5fbe8c3cd5e382a558b53123ce1 (diff)
downloadpython-apt-a9edef04412f95f3c2bc6da10388673c695a6ac3.tar.gz
* SoftwareProperties/SoftwareProperties.py:
- be slightly better about finding out about the country
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") % \