Skip to content
Permalink
Browse files
Add check to ensure profile requested is in config
  • Loading branch information
brogand93 committed Jun 24, 2014
1 parent d4126d5 commit df678ea52a156dd994dcc57b464ec97b10c6964b
Showing 1 changed file with 5 additions and 0 deletions.
@@ -78,6 +78,11 @@ def _config_from_config_profile(config_file, profile):
config = SafeConfigParser()
config.read(config_file)

if not config.has_section(profile):
sys.exit('No profile matching '+ profile
+ ' found in configuration, please run gstack-configure -p '
+ profile)

for attribute in config.options(profile):
app.config[attribute.upper()] = config.get(profile, attribute)

0 comments on commit df678ea

Please sign in to comment.