Remove the wide try/expect clause

This doesn't catch anything precise, and none of the methods should
throw a expection for anything. This also hide python 3 errors.
This commit is contained in:
Michael Scherer 2016-10-16 16:40:45 +02:00 committed by Matt Clay
parent adc56e52d8
commit c9da5e98a9

View file

@ -243,7 +243,6 @@ def parseoptions(module, options):
''' '''
options_dict = keydict() #ordered dict options_dict = keydict() #ordered dict
if options: if options:
try:
# the following regex will split on commas while # the following regex will split on commas while
# ignoring those commas that fall within quotes # ignoring those commas that fall within quotes
regex = re.compile(r'''((?:[^,"']|"[^"]*"|'[^']*')+)''') regex = re.compile(r'''((?:[^,"']|"[^"]*"|'[^']*')+)''')
@ -260,8 +259,6 @@ def parseoptions(module, options):
options_dict[key] = value options_dict[key] = value
elif part != ",": elif part != ",":
options_dict[part] = None options_dict[part] = None
except:
module.fail_json(msg="invalid option string: %s" % options)
return options_dict return options_dict