diff options
author | Adam Tauber <asciimoo@gmail.com> | 2016-12-09 19:52:49 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2016-12-09 19:53:54 +0100 |
commit | 72a217f983c935712eb872042157b4432eaec641 (patch) | |
tree | bdc3bad61cd198f24ab71363ae6c0b497eaaeb7d /searx/engines/openstreetmap.py | |
parent | 8116e341cc26593a9527bf7bfbb140a80493fe31 (diff) | |
download | searxng-72a217f983c935712eb872042157b4432eaec641.tar.gz searxng-72a217f983c935712eb872042157b4432eaec641.zip |
[mod] return empty string on missing osm title
Sometimes openstreetmap returns with None as title. In these cases use an empty
string instead.
Diffstat (limited to 'searx/engines/openstreetmap.py')
-rw-r--r-- | searx/engines/openstreetmap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/openstreetmap.py b/searx/engines/openstreetmap.py index 38baaada9..01ca7d42d 100644 --- a/searx/engines/openstreetmap.py +++ b/searx/engines/openstreetmap.py @@ -43,7 +43,7 @@ def response(resp): if 'display_name' not in r: continue - title = r['display_name'] + title = r['display_name'] or u'' osm_type = r.get('osm_type', r.get('type')) url = result_base_url.format(osm_type=osm_type, osm_id=r['osm_id']) |