From 3922d7c71fdd8f44fb4f73469c6fb2fcbc30fe50 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 25 Apr 2023 12:43:18 -0700 Subject: [PATCH] ttrss: Don't show app in enabled list of apps if install fails Closes: #1615. Tests: - Throw an unconditional exception in enable_api_access() method. Reproduce the problem described by installing ttrss app. Installation fails but ttrss shows up in enabled list. - Apply the patch. Try to install ttrss. When it fails, the app is not in the enabled list. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/ttrss/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/ttrss/__init__.py b/plinth/modules/ttrss/__init__.py index d58fc7512..461e07471 100644 --- a/plinth/modules/ttrss/__init__.py +++ b/plinth/modules/ttrss/__init__.py @@ -94,7 +94,6 @@ class TTRSSApp(app_module.App): def enable(self): """Enable components and API access.""" - super().enable() privileged.enable_api_access() # Try to set the domain to one of the available TLS domains @@ -104,6 +103,8 @@ class TTRSSApp(app_module.App): domain = next(names.get_available_tls_domains(), None) privileged.set_domain(domain) + super().enable() + def setup(self, old_version): """Install and configure the app.""" privileged.pre_setup()