Commit 52cbf052 authored by Marco Mariani's avatar Marco Mariani

report NotFound when there are no free partitions

parent 3449bf9d
...@@ -326,7 +326,7 @@ def request_not_shared(): ...@@ -326,7 +326,7 @@ def request_not_shared():
'SELECT * FROM %s WHERE slap_state="free"', (), one=True) 'SELECT * FROM %s WHERE slap_state="free"', (), one=True)
if partition is None: if partition is None:
app.logger.warning('No more free computer partition') app.logger.warning('No more free computer partition')
abort(408) abort(404)
q += ' ,software_release=?' q += ' ,software_release=?'
a(software_release) a(software_release)
if partition_reference: if partition_reference:
...@@ -417,7 +417,7 @@ def request_slave(): ...@@ -417,7 +417,7 @@ def request_slave():
if partition is None: if partition is None:
app.logger.warning('No partition corresponding to slave request: %s' % \ app.logger.warning('No partition corresponding to slave request: %s' % \
args) args)
abort(408) abort(404)
# We set slave dictionnary as described in docstring # We set slave dictionnary as described in docstring
new_slave = {} new_slave = {}
......
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