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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2023-04-29 08:47:23 -04:00
1 parent 537cc749d1
commit 3922d7c71f
1 file changed
+2 -1
+2 -1
View File
@@ -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()