From f8a8004792ca3be34a6473447fa85b54fe90b4e1 Mon Sep 17 00:00:00 2001 From: Dina Saparbaeva Date: Fri, 12 Mar 2021 11:41:45 +0000 Subject: [PATCH] follow up fix to share-shrinking changed break to Exception on timeout while resizing the share. Change-Id: Ic1460667f2c69d1ef1188d912a6bd04ebe0c0723 --- manila_ui/dashboards/project/shares/forms.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/manila_ui/dashboards/project/shares/forms.py b/manila_ui/dashboards/project/shares/forms.py index 33739201..b0c56a72 100644 --- a/manila_ui/dashboards/project/shares/forms.py +++ b/manila_ui/dashboards/project/shares/forms.py @@ -412,13 +412,16 @@ class ResizeForm(forms.SelfHandlingForm): time_elapsed += interval share = manila.share_get(request, share_id) if time_elapsed > timeout: - break + raise exceptions.WorkflowError(_( + "The operation timed out while resizing. " + "Please try again.")) if share.size == new_size: message = _('Resized share "%s"') % share.name messages.success(request, message) return True - raise Exception + raise exceptions.WorkflowError(_( + "Unable to resize share. ")) class RevertForm(forms.SelfHandlingForm):