diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index d9f3d3e1..af4eb3e8 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -5,6 +5,8 @@ Release notes ---- * ``openstack-doc-test``: Sort entries in index.html file. +* ``diff_branches.py``: Add options containing DEPRECATED in their help + string to the deprecation list. 0.27 ---- diff --git a/autogenerate_config_docs/diff_branches.py b/autogenerate_config_docs/diff_branches.py index af430a4e..0ef25d52 100755 --- a/autogenerate_config_docs/diff_branches.py +++ b/autogenerate_config_docs/diff_branches.py @@ -170,6 +170,12 @@ def diff(old_list, new_list): # Find options that have been deprecated in the new release. # If an option name is a key in the old_list dict, it means that it # wasn't deprecated. + + # Some options are deprecated, but not replaced with a new option. + # These options usually contain 'DEPRECATED' in their help string. + if 'DEPRECATED' in option['help']: + deprecated_opts.append((name, None)) + for deprecated in option['deprecated_opts']: # deprecated_opts is a list which always holds at least 1 invalid # dict. Forget it. @@ -189,6 +195,9 @@ def diff(old_list, new_list): def format_option_name(name): """Return a formatted string for the option path.""" + if name is None: + return "None" + try: section, name = name.split('/') except ValueError: