Do not print empty country information.

This commit is contained in:
Bastian Kleineidam 2011-04-06 17:22:48 +02:00
parent 504e806a7f
commit c0732e3d37
2 changed files with 2 additions and 1 deletions

View file

@ -9,6 +9,7 @@ Fixes:
- logging: Only write configured output parts in CSV logger.
- logging: Correctly encode CSV output.
Closes: SF bug #3263848
- logging: Don't print empty country information.
Changes:
- gui: Improved display of internal errors.

View file

@ -459,7 +459,7 @@ class UrlBase (object):
"""Try to ask GeoIP database for country info."""
if self.host:
country = geoip.get_country(self.host)
if country is not None:
if country:
self.add_info(_("URL is located in %(country)s.") %
{"country": _(country)})