Skip to content

Commit

Permalink
check that select_target_names is list if not None
Browse files Browse the repository at this point in the history
  • Loading branch information
jbloom committed Dec 21, 2019
1 parent 8a65923 commit f72d03b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alignparse/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ def __init__(self, *, seqsfile, feature_parse_specs,

# get targets from seqsfile
if select_target_names is not None:
if len(select_target_names) < 1:
if not (isinstance(select_target_names, list) and
len(select_target_names) >= 1):
raise ValueError('`select_target_names` must be none or '
'non-empty list')
if isinstance(seqsfile, str):
Expand Down

0 comments on commit f72d03b

Please sign in to comment.