Skip to content

Commit

Permalink
Merge pull request #16 from thpham/fix/issue-15
Browse files Browse the repository at this point in the history
Wrong behavior when inputs arguments are empty strings
  • Loading branch information
sondrelg authored Jan 13, 2022
2 parents dbf4664 + 8dee3d9 commit 34ab284
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,19 @@ def validate_inputs(
else:
untagged_only_ = untagged_only

if skip_tags is None:
if not skip_tags:
skip_tags_ = []
else:
skip_tags_ = [i.strip() for i in skip_tags.split(',')]

if keep_at_least is None:
if not keep_at_least:
keep_at_least_ = 0
else:
keep_at_least_ = int(keep_at_least)
if keep_at_least_ < 0:
raise ValueError('keep-at-least must be 0 or positive')

if filter_tags is None:
if not filter_tags:
filter_tags_ = []
else:
filter_tags_ = [i.strip() for i in filter_tags.split(',')]
Expand Down

0 comments on commit 34ab284

Please sign in to comment.