mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Parse None
This commit is contained in:
@@ -317,8 +317,8 @@ def reload_component(component):
|
|||||||
|
|
||||||
def parse_value(value_str):
|
def parse_value(value_str):
|
||||||
"""Parse a value string"""
|
"""Parse a value string"""
|
||||||
if value_str is None:
|
if value_str.lower() == "none":
|
||||||
return value_str
|
return None
|
||||||
if re.match(r"^\d+$", value_str):
|
if re.match(r"^\d+$", value_str):
|
||||||
return int(value_str)
|
return int(value_str)
|
||||||
elif re.match(r"^\d+\.\d*$", value_str):
|
elif re.match(r"^\d+\.\d*$", value_str):
|
||||||
|
|||||||
Reference in New Issue
Block a user