summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavanum Srinivas <dims@linux.vnet.ibm.com>2013-03-07 21:07:20 -0500
committerDavanum Srinivas <dims@linux.vnet.ibm.com>2013-03-07 21:07:20 -0500
commit5f5f8f616bb01527adb29f77483d7d3e7f1678c7 (patch)
treeb5c4696b453b86d474262b106e1c65bb041fe733
parent6a080df6bd8817019d204e3142a236b7974f7656 (diff)
downloadnova-5f5f8f616bb01527adb29f77483d7d3e7f1678c7.tar.gz
nova-5f5f8f616bb01527adb29f77483d7d3e7f1678c7.tar.xz
nova-5f5f8f616bb01527adb29f77483d7d3e7f1678c7.zip
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
-rwxr-xr-xbin/nova-novncproxy6
-rwxr-xr-xbin/nova-spicehtml5proxy6
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/nova-novncproxy b/bin/nova-novncproxy
index 37486f6a4..29981f53f 100755
--- a/bin/nova-novncproxy
+++ b/bin/nova-novncproxy
@@ -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
diff --git a/bin/nova-spicehtml5proxy b/bin/nova-spicehtml5proxy
index a4c97a73d..012a202ec 100755
--- a/bin/nova-spicehtml5proxy
+++ b/bin/nova-spicehtml5proxy
@@ -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