Commit 41fe8946 authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos Committed by Christos Stavrakakis
Browse files

cyclades: Small bug fix in IP Pools

* Handle invalid user input
parent d60c5744
......@@ -316,7 +316,11 @@ class IPPool(PoolManager):
def contains(self, address, index=False):
if index is False:
addr = ipaddr.IPAddress(address)
addr = ipaddr.IPAddress(address)
except ValueError:
raise InvalidValue("Invalid IP address")
if addr not in
return False
return super(IPPool, self).contains(address, index=False)
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