Commit 264945a1 by Michael Scherer

adding a single comma at the end of the options list confuse the module

it start to duplicate line, because this create
a empty option in the list, and so the module add a new line along the previous
one. See

>>> ' a,b, '.strip().split(',')
['a', 'b', '']
parent f61a4c1e
...@@ -185,6 +185,9 @@ def parseoptions(options): ...@@ -185,6 +185,9 @@ def parseoptions(options):
if options: if options:
options_list = options.strip().split(",") options_list = options.strip().split(",")
for option in options_list: for option in options_list:
# happen when there is comma at the end
if option == '':
continue
if option.find("=") != -1: if option.find("=") != -1:
(arg,val) = option.split("=", 1) (arg,val) = option.split("=", 1)
else: else:
......
Markdown is supported
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