Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
41fe8946
Commit
41fe8946
authored
Nov 13, 2013
by
Dionysis Grigoropoulos
Committed by
Christos Stavrakakis
Nov 14, 2013
Browse files
cyclades: Small bug fix in IP Pools
* Handle invalid user input
parent
d60c5744
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/db/pools/__init__.py
View file @
41fe8946
...
...
@@ -316,7 +316,11 @@ class IPPool(PoolManager):
def
contains
(
self
,
address
,
index
=
False
):
if
index
is
False
:
addr
=
ipaddr
.
IPAddress
(
address
)
try
:
addr
=
ipaddr
.
IPAddress
(
address
)
except
ValueError
:
raise
InvalidValue
(
"Invalid IP address"
)
if
addr
not
in
self
.
net
:
return
False
return
super
(
IPPool
,
self
).
contains
(
address
,
index
=
False
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment