Skip to content

Commit

Permalink
fix: added successful result condition
Browse files Browse the repository at this point in the history
  • Loading branch information
rauldpm committed Dec 12, 2023
1 parent bdebb05 commit ba3e41e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deps/wazuh_testing/wazuh_testing/tools/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ def control_service(action, daemon=None, debug_mode=False):
for _ in range(error_109_windows_retry):
command = subprocess.run(["net", action, "WazuhSvc"], stderr=subprocess.PIPE)
result = command.returncode
if result != 0:
if result == 0:
break
else:
if action == 'stop' and 'The Wazuh service is not started.' in command.stderr.decode():
result = 0
break
Expand Down

0 comments on commit ba3e41e

Please sign in to comment.