commit/galaxy-central: dan: Fix from write_integrated_tool_panel_config_file when a section has been removed from tool_conf.xml
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/4f788268c76d/ changeset: 4f788268c76d user: dan date: 2012-09-27 20:25:45 summary: Fix from write_integrated_tool_panel_config_file when a section has been removed from tool_conf.xml affected #: 1 file diff -r 206bd8b822caab015f8447c92aeb63264afc3667 -r 4f788268c76dcb77e99076dbfbc8cf65c05b00cc lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -263,36 +263,35 @@ os.write( fd, '<?xml version="1.0"?>\n' ) os.write( fd, '<toolbox>\n' ) for key, item in self.integrated_tool_panel.items(): - if key.startswith( 'tool_' ): - if item: + if item: + if key.startswith( 'tool_' ): os.write( fd, ' <tool id="%s" />\n' % item.id ) - elif key.startswith( 'workflow_' ): - if item: + elif key.startswith( 'workflow_' ): os.write( fd, ' <workflow id="%s" />\n' % item.id ) - elif key.startswith( 'label_' ): - label_id = item.id or '' - label_text = item.text or '' - label_version = item.version or '' - os.write( fd, ' <label id="%s" text="%s" version="%s" />\n' % ( label_id, label_text, label_version ) ) - elif key.startswith( 'section_' ): - section_id = item.id or '' - section_name = item.name or '' - section_version = item.version or '' - os.write( fd, ' <section id="%s" name="%s" version="%s">\n' % ( section_id, section_name, section_version ) ) - for section_key, section_item in item.elems.items(): - if section_key.startswith( 'tool_' ): - if section_item: - os.write( fd, ' <tool id="%s" />\n' % section_item.id ) - elif section_key.startswith( 'workflow_' ): - if section_item: - os.write( fd, ' <workflow id="%s" />\n' % section_item.id ) - elif section_key.startswith( 'label_' ): - if section_item: - label_id = section_item.id or '' - label_text = section_item.text or '' - label_version = section_item.version or '' - os.write( fd, ' <label id="%s" text="%s" version="%s" />\n' % ( label_id, label_text, label_version ) ) - os.write( fd, ' </section>\n' ) + elif key.startswith( 'label_' ): + label_id = item.id or '' + label_text = item.text or '' + label_version = item.version or '' + os.write( fd, ' <label id="%s" text="%s" version="%s" />\n' % ( label_id, label_text, label_version ) ) + elif key.startswith( 'section_' ): + section_id = item.id or '' + section_name = item.name or '' + section_version = item.version or '' + os.write( fd, ' <section id="%s" name="%s" version="%s">\n' % ( section_id, section_name, section_version ) ) + for section_key, section_item in item.elems.items(): + if section_key.startswith( 'tool_' ): + if section_item: + os.write( fd, ' <tool id="%s" />\n' % section_item.id ) + elif section_key.startswith( 'workflow_' ): + if section_item: + os.write( fd, ' <workflow id="%s" />\n' % section_item.id ) + elif section_key.startswith( 'label_' ): + if section_item: + label_id = section_item.id or '' + label_text = section_item.text or '' + label_version = section_item.version or '' + os.write( fd, ' <label id="%s" text="%s" version="%s" />\n' % ( label_id, label_text, label_version ) ) + os.write( fd, ' </section>\n' ) os.write( fd, '</toolbox>\n' ) os.close( fd ) shutil.move( filename, os.path.abspath( self.integrated_tool_panel_config ) ) 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.
participants (1)
-
Bitbucket