1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/ec017c724b83/ Changeset: ec017c724b83 User: carlfeberhard Date: 2014-09-18 18:44:51+00:00 Summary: Visualizations registry: do not warn when a plugin is set to 'disabled' - use info Affected #: 2 files diff -r 5b745b6649d29bd576cccfd0466cb1f5950838aa -r ec017c724b8326279c7c5b8856cce3c98b9cb61a lib/galaxy/visualization/registry.py --- a/lib/galaxy/visualization/registry.py +++ b/lib/galaxy/visualization/registry.py @@ -159,7 +159,7 @@ # config file is required, otherwise skip this visualization plugin[ 'config_file' ] = os.path.join( plugin_path, 'config', ( plugin.name + '.xml' ) ) config = self.config_parser.parse_file( plugin.config_file ) - + if not config: return None plugin[ 'config' ] = config @@ -390,14 +390,9 @@ Parse the given XML file for visualizations data. :returns: visualization config dictionary """ - try: - xml_tree = galaxy.util.parse_xml( xml_filepath ) - visualization = self.parse_visualization( xml_tree.getroot() ) - return visualization - # skip vis' with parsing errors - don't shutdown the startup - except ParsingException, parse_exc: - log.exception( 'Skipped visualization config "%s" due to parsing errors', xml_filepath ) - return None + xml_tree = galaxy.util.parse_xml( xml_filepath ) + visualization = self.parse_visualization( xml_tree.getroot() ) + return visualization def parse_visualization( self, xml_tree ): """ @@ -406,16 +401,16 @@ """ returned = {} - # allow manually turning off a vis by checking for a disabled property - if 'disabled' in xml_tree.attrib: -#TODO: differentiate between disabled and failed to parse, log.warn only on failure, log.info otherwise - return None - # a text display name for end user links returned[ 'name' ] = xml_tree.attrib.get( 'name', None ) if not returned[ 'name' ]: raise ParsingException( 'visualization needs a name attribute' ) + # allow manually turning off a vis by checking for a disabled property + if 'disabled' in xml_tree.attrib: + log.info( '%s, plugin disabled: %s. Skipping...', self, returned[ 'name' ] ) + return None + # record the embeddable flag - defaults to false # this is a design by contract promise that the visualization can be rendered inside another page # often by rendering only a DOM fragment. Since this is an advanced feature that requires a bit more diff -r 5b745b6649d29bd576cccfd0466cb1f5950838aa -r ec017c724b8326279c7c5b8856cce3c98b9cb61a lib/galaxy/web/base/pluginframework.py --- a/lib/galaxy/web/base/pluginframework.py +++ b/lib/galaxy/web/base/pluginframework.py @@ -118,15 +118,14 @@ for plugin_path in self.find_plugins(): try: plugin = self.load_plugin( plugin_path ) - if not plugin: - log.warn( '%s, plugin load failed or disabled: %s. Skipping...', self, plugin_path ) + + if plugin and plugin.name not in self.plugins: + self.plugins[ plugin.name ] = plugin + log.info( '%s, loaded plugin: %s', self, plugin.name ) #NOTE: prevent silent, implicit overwrite here (two plugins in two diff directories) #TODO: overwriting may be desired - elif plugin.name in self.plugins: + elif plugin and plugin.name in self.plugins: log.warn( '%s, plugin with name already exists: %s. Skipping...', self, plugin.name ) - else: - self.plugins[ plugin.name ] = plugin - log.info( '%s, loaded plugin: %s', self, plugin.name ) except Exception, exc: if not self.skip_bad_plugins: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.