mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
setup: Don't perform is-package-manager-busy checks when not needed
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
915b8013d9
commit
d1ead29251
@ -184,7 +184,10 @@ class SetupView(TemplateView):
|
|||||||
context['setup_state'] = setup_helper.get_state()
|
context['setup_state'] = setup_helper.get_state()
|
||||||
context['setup_current_operation'] = setup_helper.current_operation
|
context['setup_current_operation'] = setup_helper.current_operation
|
||||||
|
|
||||||
context['package_manager_is_busy'] = package.is_package_manager_busy()
|
# Perform expensive operation only if needed
|
||||||
|
if not context['setup_current_operation']:
|
||||||
|
context['package_manager_is_busy'] = package.is_package_manager_busy()
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user