leapp/SOURCES/0008-Update-leapp-snactor-c...

35 lines
1.3 KiB
Diff

From 833981217329e43b73840e796bc88978cb3ae272 Mon Sep 17 00:00:00 2001
From: Vinzenz 'evilissimo' Feenstra <evilissimo@gmail.com>
Date: Mon, 31 Oct 2022 14:51:20 +0100
Subject: [PATCH 08/16] Update leapp/snactor/commands/workflow/sanity_check.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Petr Stodůlka <xstodu05@gmail.com>
---
leapp/snactor/commands/workflow/sanity_check.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/leapp/snactor/commands/workflow/sanity_check.py b/leapp/snactor/commands/workflow/sanity_check.py
index 6f5db78..ac98dae 100644
--- a/leapp/snactor/commands/workflow/sanity_check.py
+++ b/leapp/snactor/commands/workflow/sanity_check.py
@@ -29,9 +29,10 @@ def print_fail(error):
def _ignore_file_content(path):
- if path:
- with open(path) as f:
- return [line.strip() for line in f.read().split('\n') if not line.strip().startswith('#')]
+ if not path:
+ return []
+ with open(path) as f:
+ return [line.strip() for line in f.read().split('\n') if line.strip() and not line.strip().startswith('#')]
@workflow.command('sanity-check', help='Perform workflow sanity checks', description=_LONG_DESCRIPTION)
--
2.39.0