In case MultiStrOpt option's value is empty list, current extract_opts.py
logic will ignore it. This patch aims to update func _print_opt:
add the multistropt's option_name in conf even its value is empty list.
This bug also affects https://bugs.launchpad.net/cinder/+bug/
1240783
Closes-bug: #
1241348
Change-Id: Ica1da0cd20c97a587964cb0059836d609a440145
# Driver or drivers to handle sending notifications (multi
# valued)
+#notification_driver=
# Default notification level for outgoing notifications
# (string value)
print('#%s=%s' % (opt_name, ','.join(opt_default)))
elif opt_type == MULTISTROPT:
assert(isinstance(opt_default, list))
- for default in opt_default:
- print('#%s=%s' % (opt_name, default))
+ if opt_default:
+ for default in opt_default:
+ print('#%s=%s' % (opt_name, default))
+ else:
+ print('#%s=' % (opt_name))
print()
except Exception:
sys.stderr.write('Error in option "%s"\n' % opt_name)