diff options
author | Thomas Goirand <thomas@goirand.fr> | 2013-06-25 22:46:48 +0800 |
---|---|---|
committer | Thomas Goirand <thomas@goirand.fr> | 2013-06-25 22:48:42 +0800 |
commit | 631a4950650538c2e009ddae5165dd1f18f6308f (patch) | |
tree | dfefc0d43aca330b9b86bb897d2678078129ccd8 | |
parent | 7fe7bd8f39ea4cf10c34cd3daa28d70a8fd76670 (diff) | |
download | oslo-631a4950650538c2e009ddae5165dd1f18f6308f.tar.gz oslo-631a4950650538c2e009ddae5165dd1f18f6308f.tar.xz oslo-631a4950650538c2e009ddae5165dd1f18f6308f.zip |
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
-rwxr-xr-x | openstack/common/config/generator.py | 1 |
1 files changed, 1 insertions, 0 deletions
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) |