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

This commit is contained in:
Reed Murphy 2012-04-27 11:25:43 +10:00
commit abf524405a

View file

@ -267,6 +267,7 @@ def parse_yaml_from_file(path):
def parse_kv(args): def parse_kv(args):
''' convert a string of key/value items to a dict ''' ''' convert a string of key/value items to a dict '''
options = {} options = {}
if not args is None:
vargs = shlex.split(args, posix=True) vargs = shlex.split(args, posix=True)
for x in vargs: for x in vargs:
if x.find("=") != -1: if x.find("=") != -1: