mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
framework: Remove module init() functions
Fixes #1906 Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
0df674dc20
commit
d92ca09e19
60 files changed
+110
-573
No files matched your search
@@ -18,7 +18,7 @@ from plinth.modules.users.components import UsersAndGroups
|
||||
|
||||
from .forms import is_repo_url
|
||||
from .manifest import (GIT_REPO_PATH, # noqa, pylint: disable=unused-import
|
||||
backup, clients)
|
||||
backup, clients)
|
||||
|
||||
version = 1
|
||||
|
||||
@@ -88,6 +88,10 @@ class GitwebApp(app_module.App):
|
||||
groups=groups)
|
||||
self.add(users_and_groups)
|
||||
|
||||
setup_helper = globals()['setup_helper']
|
||||
if setup_helper.get_state() != 'needs-setup':
|
||||
self.update_service_access()
|
||||
|
||||
def set_shortcut_login_required(self, login_required):
|
||||
"""Change the login_required property of shortcut."""
|
||||
shortcut = self.remove('shortcut-gitweb')
|
||||
@@ -164,18 +168,6 @@ class GitwebWebserverAuth(Webserver):
|
||||
super().enable()
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the module."""
|
||||
global app
|
||||
app = GitwebApp()
|
||||
|
||||
setup_helper = globals()['setup_helper']
|
||||
if setup_helper.get_state() != 'needs-setup':
|
||||
app.update_service_access()
|
||||
if app.is_enabled():
|
||||
app.set_enabled(True)
|
||||
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(managed_packages)
|
||||
|
||||
Reference in new issue
Block a user