Skip to content

Commit

Permalink
Parse None
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdnbradford committed Nov 15, 2024
1 parent e7555ae commit 9ed2a92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tljh/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ def reload_component(component):

def parse_value(value_str):
"""Parse a value string"""
if value_str is None:
return value_str
if value_str.lower() == "none":
return None
if re.match(r"^\d+$", value_str):
return int(value_str)
elif re.match(r"^\d+\.\d*$", value_str):
Expand Down

0 comments on commit 9ed2a92

Please sign in to comment.