option.help can be None
Handle the case where option.help is none, meaning we can't use 'startswith'. Change-Id: I0d7dceeed89ad287b9786f04bf8dc9aba1b845dd
This commit is contained in:
parent
f9a8579b25
commit
81f7a8f75a
@ -459,8 +459,9 @@ def _format_opt(option):
|
||||
opt_type = _TYPE_DESCRIPTIONS.get(type(option), 'Unknown')
|
||||
|
||||
flags = []
|
||||
|
||||
if (option.deprecated_for_removal or
|
||||
option.help.startswith('DEPRECATED')):
|
||||
(option.help and option.help.startswith('DEPRECATED'))):
|
||||
flags.append(('Deprecated', deprecated_text))
|
||||
if option.mutable:
|
||||
flags.append(('Mutable', 'This option can be changed without'
|
||||
|
Loading…
Reference in New Issue
Block a user