Check CONF values *after* command line args are parsed

CONF.ssl_only will contain the default value till
parse_args is called.

Fix for LP# 1123540

Change-Id: Ib80d39b883c8ce2d6b813ca2b76051dd95ffb2b6
This commit is contained in:
Davanum Srinivas
2013-03-07 21:07:20 -05:00
parent 432578aede
commit 3e9e9e7eeb
2 changed files with 6 additions and 6 deletions

View File

@@ -66,12 +66,12 @@ CONF.import_opt('debug', 'nova.openstack.common.log')
if __name__ == '__main__':
if CONF.ssl_only and not os.path.exists(CONF.cert):
parser.error("SSL only and %s not found" % CONF.cert)
# Setup flags
config.parse_args(sys.argv)
if CONF.ssl_only and not os.path.exists(CONF.cert):
parser.error("SSL only and %s not found" % CONF.cert)
# Check to see if novnc html/js/css files are present
if not os.path.exists(CONF.web):
print "Can not find novnc html/js/css files at %s." % CONF.web

View File

@@ -66,12 +66,12 @@ CONF.import_opt('debug', 'nova.openstack.common.log')
if __name__ == '__main__':
if CONF.ssl_only and not os.path.exists(CONF.cert):
parser.error("SSL only and %s not found" % CONF.cert)
# Setup flags
config.parse_args(sys.argv)
if CONF.ssl_only and not os.path.exists(CONF.cert):
parser.error("SSL only and %s not found" % CONF.cert)
# Check to see if spice html/js/css files are present
if not os.path.exists(CONF.web):
print "Can not find spice html/js/css files at %s." % CONF.web