From 200924b6d8ec143fc97be76d2235d2accec2a3d3 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 29 Aug 2017 00:07:47 +0300 Subject: [PATCH] add check to see if the 'socket' or 'port' options have been set in the configuration file before trying to load it in initilaize.py --- modules/initialize.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/initialize.py b/modules/initialize.py index 080af04..38ba3f8 100644 --- a/modules/initialize.py +++ b/modules/initialize.py @@ -347,10 +347,12 @@ def get_config(branchname): dataobject.server.addbranch('nginx') - dataobject.server.nginx.port = config['nginx']['port'] - dataobject.server.nginx.socket = config['nginx']['socket'] + if 'port' in config['nginx']: + dataobject.server.nginx.port = config['nginx']['port'] - print "DEBUG -- socket: %s" % dataobject.server.nginx.socket + if 'socket' in config['nginx']: + dataobject.server.nginx.socket = config['nginx']['socket'] + print "DEBUG -- socket: %s" % dataobject.server.nginx.socket if config['project']['host'] == "localhost": dataobject.server.nginx.host = "{projectname}.{ext}".format(