Commit 2c08cf0f authored by Greg Ward's avatar Greg Ward

Fix '_set_command_options()' so it only calls 'strtobool()' on strings

(was crashing on any boolean command-line option!).
parent 81467b81
......@@ -755,9 +755,10 @@ class Distribution:
neg_opt = {}
try:
if neg_opt.has_key(option):
is_string = type(value) is StringType
if neg_opt.has_key(option) and is_string:
setattr(command_obj, neg_opt[option], not strtobool(value))
elif option in bool_opts:
elif option in bool_opts and is_string:
setattr(command_obj, option, strtobool(value))
elif hasattr(command_obj, option):
setattr(command_obj, option, value)
......
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