diff options
| author | glatzor@ubuntu.com <> | 2006-07-27 22:40:09 +0200 |
|---|---|---|
| committer | glatzor@ubuntu.com <> | 2006-07-27 22:40:09 +0200 |
| commit | 2179699f8b08b68be792cb0e5f263931475fc26d (patch) | |
| tree | fdbf7393acb0e0fc5af678c976cd944ba790270f /SoftwareProperties/SoftwareProperties.py | |
| parent | 7403f3888293e0c9ff544a218decaf6b428b2396 (diff) | |
| download | python-apt-2179699f8b08b68be792cb0e5f263931475fc26d.tar.gz | |
* add an error handler if the locale is not in the iso country list
Diffstat (limited to 'SoftwareProperties/SoftwareProperties.py')
| -rw-r--r-- | SoftwareProperties/SoftwareProperties.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 93028206..9e9071be 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -292,10 +292,14 @@ class SoftwareProperties(SimpleGladeApp): self.combobox_server.set_model(server_store) server_store.append([_("Main server"), self.distro.main_server]) - # TRANSLATORS: %s is a country - server_store.append([_("Server for %s") % gettext.dgettext("iso-3166", - self.distro.country).rstrip(), - self.distro.nearest_server]) + if self.distro.country != None: + # TRANSLATORS: %s is a country + server_store.append([_("Server for %s") % gettext.dgettext("iso-3166", + self.distro.country).rstrip(), + self.distro.nearest_server]) + else: + server_store.append([_("Nearest server"), + self.distro.nearest_server]) if len(self.distro.used_servers) > 0: for server in self.distro.used_servers: if not re.match(server, self.distro.main_server) and \ |
