mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
Show a coherent error on bulk change lock timeout
Since it's possible that the user will try to get patches while the update script is running, ensure we show a sensible error if the script times out waiting for a lock. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
93ce26f21c
commit
bea2db8464
|
@ -232,6 +232,10 @@ def bulk_change_patch_view(request, pk):
|
|||
return response
|
||||
return HttpResponse('No patch data generated', content_type='text/plain')
|
||||
except Exception as e:
|
||||
output = getattr(e, 'output', None)
|
||||
if output:
|
||||
if 'timeout' in output:
|
||||
return HttpResponse('Failed to generate patches: timed out waiting for lock. Please try again shortly.', content_type='text/plain')
|
||||
return HttpResponse('Failed to generate patches: %s' % e, content_type='text/plain')
|
||||
# FIXME better error handling
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user