From c0732e3d37ebf6d834a5497f7d5ce458bd76c032 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Wed, 6 Apr 2011 17:22:48 +0200 Subject: [PATCH] Do not print empty country information. --- doc/changelog.txt | 1 + linkcheck/checker/urlbase.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index c77a75b9..8bb0add6 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -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. diff --git a/linkcheck/checker/urlbase.py b/linkcheck/checker/urlbase.py index 672cc370..ba36762e 100644 --- a/linkcheck/checker/urlbase.py +++ b/linkcheck/checker/urlbase.py @@ -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)})