Skip to content

Commit

Permalink
add check for config-dir parameter (bug1101129)
Browse files Browse the repository at this point in the history
Change-Id: I5cd454cc3c5bf5da9656c05e9a22385ffcd01147
  • Loading branch information
Gordon Chung authored and apevec committed Mar 12, 2013
1 parent 8690166 commit bb1ded0
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions bin/keystone-all
Expand Up @@ -86,19 +86,24 @@ if __name__ == '__main__':
if CONF.debug:
CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG)

if not CONF.config_file:
print "No config files could be found."
CONF.print_help()
sys.exit(1)

options = deploy.appconfig('config:%s' % CONF.config_file[0])
if CONF.config_file:
paste_config = CONF.config_file[0]
else:
paste_config = CONF.find_file('keystone.conf')
if not paste_config:
print ("The keystone.conf file could not be found in the "
"configuration directories.")
CONF.print_help()
sys.exit(1)

options = deploy.appconfig('config:%s' % paste_config)

servers = []
servers.append(create_server(CONF.config_file[0],
servers.append(create_server(paste_config,
'admin',
CONF.bind_host,
int(CONF.admin_port)))
servers.append(create_server(CONF.config_file[0],
servers.append(create_server(paste_config,
'main',
CONF.bind_host,
int(CONF.public_port)))
Expand Down

0 comments on commit bb1ded0

Please sign in to comment.