From 4a4b18f19f9eb3dac0675e49d64ec919d4cab638 Mon Sep 17 00:00:00 2001 From: Ron Stone Date: Thu, 24 Oct 2024 19:28:48 +0000 Subject: [PATCH] Fix script Fix undef'd var scenario Change-Id: Idd51c2838cb2863faf31fd33eba63270633f1bdb Signed-off-by: Ron Stone --- hide-table-columns.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hide-table-columns.py b/hide-table-columns.py index c946565a1..771f2fe85 100644 --- a/hide-table-columns.py +++ b/hide-table-columns.py @@ -8,6 +8,7 @@ def remove_column_from_tables(file_path): with open(file_path, 'r', encoding='utf-8') as file: soup = BeautifulSoup(file, 'lxml') + empty_rows = 0 in_context = None print("Checking if in valid context for", file_path) @@ -41,8 +42,6 @@ def remove_column_from_tables(file_path): if row_tag: if row_tag.get('content') == 1: empty_rows = 1 - else: - empty_rows = 0 for column_name in column_names: