From 631a4950650538c2e009ddae5165dd1f18f6308f Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Tue, 25 Jun 2013 22:46:48 +0800 Subject: Fixes crash when no help for an option When there is no help available for an option, the generator.py simply crashes. This fixes this by initialising opt_help. Fixes Bug1194524 Change-Id: I94c23973bdad603703f12e936b7e72fe0e81c3f0 --- openstack/common/config/generator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openstack/common/config/generator.py b/openstack/common/config/generator.py index 09649e7..8ebfba1 100755 --- a/openstack/common/config/generator.py +++ b/openstack/common/config/generator.py @@ -205,6 +205,7 @@ def _print_opt(opt): opt_name, opt_default, opt_help = opt.dest, opt.default, opt.help if not opt_help: sys.stderr.write('WARNING: "%s" is missing help string.\n' % opt_name) + opt_help = "" opt_type = None try: opt_type = OPTION_REGEX.search(str(type(opt))).group(0) -- cgit