Make ; parsing optional
This commit is contained in:
@@ -107,13 +107,16 @@ def print_dict(d, formatters=None):
|
||||
print(pt.get_string(sortby='Property'))
|
||||
|
||||
|
||||
def format_parameters(params):
|
||||
def format_parameters(params, parse_semicolon=True):
|
||||
'''Reformat parameters into dict of format expected by the API.'''
|
||||
if not params:
|
||||
return {}
|
||||
|
||||
if len(params) == 1:
|
||||
params = params[0].split(';')
|
||||
if parse_semicolon:
|
||||
# expect multiple invocations of --parameters but fall back to ';'
|
||||
# delimited if only one --parameters is specified
|
||||
if len(params) == 1:
|
||||
params = params[0].split(';')
|
||||
|
||||
parameters = {}
|
||||
for p in params:
|
||||
|
||||
Reference in New Issue
Block a user