From 5f047fdbc89d660b7a15b106ade205501e5c8690 Mon Sep 17 00:00:00 2001 From: Sumit Jaiswal Date: Fri, 28 Jun 2024 00:37:08 +0530 Subject: [PATCH] fix new line Signed-off-by: Sumit Jaiswal --- ansible_risk_insight/finder.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible_risk_insight/finder.py b/ansible_risk_insight/finder.py index ec431a4f..e21adcd4 100644 --- a/ansible_risk_insight/finder.py +++ b/ansible_risk_insight/finder.py @@ -832,8 +832,7 @@ def update_the_yaml_target(file_path, line_number_list, new_content_list): temp_content = [] start = start_line_number - 1 end = stop_line_number - 1 - if len(data_copy) != start: - data_copy.append('\n') + data_copy.append('\n') for i in range(start, end): line_number = i if len(lines) == i: