Skip to content

Commit

Permalink
handle if input to format_thresh is already a list
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe committed Nov 4, 2022
1 parent e599477 commit d329275
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions metplus/util/string_manip.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ def format_thresh(thresh_str):
@returns string of comma-separated list of the threshold(s) with
letter format, i.e. gt3,le5.5,eq7
"""
if isinstance(thresh_str, list):
return format_thresh(','.join(thresh_str))

formatted_thresh_list = []
# separate thresholds by comma and strip off whitespace around values
thresh_list = [thresh.strip() for thresh in thresh_str.split(',')]
Expand Down

0 comments on commit d329275

Please sign in to comment.