From 012db6ac93c6d7c767d5dfef4aa5af173108834e Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 1 Aug 2019 21:06:31 -0700 Subject: [PATCH] cockpit: Don't handle the domain changed signal Domain added and removed signals provide sufficient knowledge of domain name changes. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/cockpit/__init__.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/plinth/modules/cockpit/__init__.py b/plinth/modules/cockpit/__init__.py index de9ae7585..ee08955d7 100644 --- a/plinth/modules/cockpit/__init__.py +++ b/plinth/modules/cockpit/__init__.py @@ -28,7 +28,7 @@ from plinth.daemon import Daemon from plinth.modules import names from plinth.modules.apache.components import Webserver from plinth.modules.firewall.components import Firewall -from plinth.signals import domain_added, domain_removed, domainname_change +from plinth.signals import domain_added, domain_removed from plinth.utils import format_lazy from .manifest import backup, clients # noqa, pylint: disable=unused-import @@ -104,7 +104,6 @@ def init(): domain_added.connect(on_domain_added) domain_removed.connect(on_domain_removed) - domainname_change.connect(on_domainname_change) def setup(helper, old_version=None): @@ -140,11 +139,3 @@ def on_domain_removed(sender, domain_type, name, **kwargs): setup_helper = globals()['setup_helper'] if setup_helper.get_state() != 'needs-setup': actions.superuser_run('cockpit', ['remove-domain', name]) - - -def on_domainname_change(sender, old_domainname, new_domainname, **kwargs): - """Handle change of a domain.""" - setup_helper = globals()['setup_helper'] - if setup_helper.get_state() != 'needs-setup': - actions.superuser_run('cockpit', ['remove-domain', old_domainname]) - actions.superuser_run('cockpit', ['add-domain', new_domainname])