Commit 29f1aca4 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Robustify extract_parameters

parent 2eb5854d
......@@ -94,6 +94,8 @@ def extract_parameters(params_str, sep=";"):
>>> extract_parameters("window_width=None; median_filt_shape=(3,3); padding_mode='wrap'")
... {'window_width': None, 'median_filt_shape': (3, 3), 'padding_mode': 'wrap'}
"""
if params_str in ("", None):
return {}
params_list = params_str.strip(sep).split(sep)
res = {}
for param_str in params_list:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment