Skip to content

Commit

Permalink
Update leapp/snactor/commands/workflow/sanity_check.py
Browse files Browse the repository at this point in the history
Co-authored-by: Petr Stodůlka <xstodu05@gmail.com>
  • Loading branch information
vinzenz and pirat89 committed Nov 1, 2022
1 parent 9b26394 commit 8339812
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions leapp/snactor/commands/workflow/sanity_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8339812

Please sign in to comment.