From 2179699f8b08b68be792cb0e5f263931475fc26d Mon Sep 17 00:00:00 2001 From: "glatzor@ubuntu.com" <> Date: Thu, 27 Jul 2006 22:40:09 +0200 Subject: * add an error handler if the locale is not in the iso country list --- SoftwareProperties/aptsources.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'SoftwareProperties/aptsources.py') diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py index 40b55dfa..a4d16fa0 100644 --- a/SoftwareProperties/aptsources.py +++ b/SoftwareProperties/aptsources.py @@ -563,7 +563,10 @@ class Distribution: country_code = locale[a+1:z].lower() self.nearest_server = "http://%s.archive.ubuntu.com/ubuntu/" % \ country_code - self.country = self.countries[country_code] + if self.countries.has_key(country_code): + self.country = self.countries[country_code] + else: + self.country = None # other used servers for medium in self.used_media: -- cgit v1.2.3