Commit 89f5587c authored by Romain Bignon's avatar Romain Bignon

don't crash when website is not available

parent 63774442
......@@ -44,6 +44,9 @@ class IpinfodbBackend(BaseBackend, ICapGeolocIp):
content = self.browser.readurl('' % str(ipaddr))
if content is None:
raise BrowserUnavailable()
if 'Invalid IP or domain name' in content:
raise Exception('Bad parameter')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment