From d1f5ab91be74f0c599e619d2ffbf5aa59d389e7c Mon Sep 17 00:00:00 2001
From: cherry530 <707078654@qq.com>
Date: Mon, 25 Nov 2024 15:38:27 +0800
Subject: [PATCH] Remove where cockpit_present is called

Signed-off-by: cherry530 <707078654@qq.com>
---
 src/lib389/lib389/cli_ctl/cockpit.py | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/lib389/lib389/cli_ctl/cockpit.py b/src/lib389/lib389/cli_ctl/cockpit.py
index afc7247..13a3eae 100644
--- a/src/lib389/lib389/cli_ctl/cockpit.py
+++ b/src/lib389/lib389/cli_ctl/cockpit.py
@@ -27,9 +27,6 @@ def open_firewall(inst, log, args):
     """
     Open the firewall for Cockpit service
     """
-    if not cockpit_present():
-        raise ValueError("The 'cockpit' package is not installed on this system")
-
     OPEN_CMD = ['sudo', 'firewall-cmd', '--add-service=cockpit', '--permanent']
     if args.zone is not None:
         OPEN_CMD.append(f' --zone={args.zone}')
@@ -43,9 +40,6 @@ def disable_cockpit(inst, log, args):
     """
     Disable Cockpit socket
     """
-    if not cockpit_present():
-        raise ValueError("The 'cockpit' package is not installed on this system")
-
     DISABLE_CMD = ['sudo', 'systemctl', 'disable', '--now', 'cockpit.socket']
     try:
         subprocess.run(DISABLE_CMD)
@@ -57,9 +51,6 @@ def close_firewall(inst, log, args):
     """
     Close firewall for Cockpit service
     """
-    if not cockpit_present():
-        raise ValueError("The 'cockpit' package is not installed on this system")
-
     CLOSE_CMD = ['sudo', 'firewall-cmd', '--remove-service=cockpit', '--permanent']
     try:
         subprocess.run(CLOSE_CMD)
-- 
2.43.0

