Commit abf52440 by Reed Murphy

shlex.split() tries to read from stdin if passed None

parent b9982fc1
......@@ -267,11 +267,12 @@ def parse_yaml_from_file(path):
def parse_kv(args):
''' convert a string of key/value items to a dict '''
options = {}
vargs = shlex.split(args, posix=True)
for x in vargs:
if x.find("=") != -1:
k, v = x.split("=")
options[k]=v
if not args is None:
vargs = shlex.split(args, posix=True)
for x in vargs:
if x.find("=") != -1:
k, v = x.split("=")
options[k]=v
return options
class SortedOptParser(optparse.OptionParser):
......
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