From c58742e55bf2c7206618a012adade58f2fc20150 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 18 Oct 2014 18:38:04 -0400 Subject: [PATCH] Use newer-style Galaxy configuration of interactive environments. Setup a sample file and fallback on it if a materialized .ini isn't present. Use .ini instead of .conf for consistency with the rest of the config directory. --- .../ipython/config/{ipython.conf => ipython.ini.sample} | 0 .../interactive_environments/ipython/templates/ie.mako | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) rename config/plugins/interactive_environments/ipython/config/{ipython.conf => ipython.ini.sample} (100%) diff --git a/config/plugins/interactive_environments/ipython/config/ipython.conf b/config/plugins/interactive_environments/ipython/config/ipython.ini.sample similarity index 100% rename from config/plugins/interactive_environments/ipython/config/ipython.conf rename to config/plugins/interactive_environments/ipython/config/ipython.ini.sample diff --git a/config/plugins/interactive_environments/ipython/templates/ie.mako b/config/plugins/interactive_environments/ipython/templates/ie.mako index c6b6df55955..ffbc3d64eb2 100644 --- a/config/plugins/interactive_environments/ipython/templates/ie.mako +++ b/config/plugins/interactive_environments/ipython/templates/ie.mako @@ -30,7 +30,10 @@ import ConfigParser self.attr.our_config_dir = os.path.join(plugin_path, "config") self.attr.our_template_dir = os.path.join(plugin_path, "templates") self.attr.viz_config = ConfigParser.SafeConfigParser(default_dict) - self.attr.viz_config.read( os.path.join( self.attr.our_config_dir, self.attr.viz_id + ".conf" ) ) + conf_path = os.path.join( self.attr.our_config_dir, self.attr.viz_id + ".ini" ) + if not os.path.exists( conf_path ): + conf_path = "%s.sample" % conf_path + self.attr.viz_config.read( conf_path ) # Store some variables we want by default self.attr.PASSWORD_AUTH = self.attr.viz_config.getboolean("main", "password_auth") self.attr.APACHE_URLS = self.attr.viz_config.getboolean("main", "apache_urls")