File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ def register_opts(ignore_errors=False):
221221 cfg .StrOpt (
222222 "ssl_cert_reqs" ,
223223 default = None ,
224- choices = "none, optional, required" ,
224+ choices = [ "none" , " optional" , " required"] ,
225225 help = "Specifies whether a certificate is required from the other side of the "
226226 "connection, and whether it will be validated if provided" ,
227227 ),
@@ -303,7 +303,7 @@ def register_opts(ignore_errors=False):
303303 cfg .StrOpt (
304304 "ssl_cert_reqs" ,
305305 default = None ,
306- choices = "none, optional, required" ,
306+ choices = [ "none" , " optional" , " required"] ,
307307 help = "Specifies whether a certificate is required from the other side of the "
308308 "connection, and whether it will be validated if provided." ,
309309 ),
Original file line number Diff line number Diff line change 2121import sys
2222import traceback
2323
24+ from collections import OrderedDict
2425from oslo_config import cfg
2526
2627
@@ -188,7 +189,7 @@ def _print_options(opt_group, options):
188189 print (("# %s" % opt .help ).strip ())
189190
190191 if isinstance (opt , cfg .StrOpt ) and opt .type .choices :
191- if isinstance (opt .type .choices , list ):
192+ if isinstance (opt .type .choices , OrderedDict ):
192193 valid_values = ", " .join ([str (x ) for x in opt .type .choices ])
193194 else :
194195 valid_values = opt .type .choices
You can’t perform that action at this time.
0 commit comments