[API]: Fix issue where an invalid LBID would give a 500 error

Change-Id: Ibf3df2a958e661c27e44e3b0cfef4216e33ccc44
This commit is contained in:
Andrew Hutchings
2013-09-26 09:54:42 +01:00
parent f7e0dac375
commit 9822077652

View File

@@ -510,6 +510,11 @@ class LoadBalancersController(RestController):
Raises: 404
"""
try:
lbid = int(lbid)
except ValueError:
raise abort(404)
if len(remainder):
if remainder[0] == 'nodes':
return NodesController(lbid), remainder[1:]