mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix for viewing README files contained in tool shed repositories.
This commit is contained in:
@@ -13,7 +13,7 @@ from galaxy.util.shed_util import create_repo_info_dict, get_changectx_for_chang
|
||||
from galaxy.util.shed_util import get_repository_file_contents, get_repository_metadata_by_changeset_revision, handle_sample_files_and_load_tool_from_disk
|
||||
from galaxy.util.shed_util import handle_sample_files_and_load_tool_from_tmp_config, INITIAL_CHANGELOG_HASH, load_tool_from_config, NOT_TOOL_CONFIGS
|
||||
from galaxy.util.shed_util import open_repository_files_folder, reversed_lower_upper_bounded_changelog, reversed_upper_bounded_changelog, strip_path
|
||||
from galaxy.util.shed_util import to_html_escaped, translate_string, update_repository, url_join
|
||||
from galaxy.util.shed_util import to_html_escaped, update_repository, url_join
|
||||
from galaxy.tool_shed.encoding_util import *
|
||||
from common import *
|
||||
|
||||
|
||||
@@ -1443,7 +1443,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
response = urllib2.urlopen( url )
|
||||
raw_text = response.read()
|
||||
response.close()
|
||||
readme_text = translate_string( raw_text, to_html=True )
|
||||
readme_text = raw_text
|
||||
else:
|
||||
readme_text = ''
|
||||
return trans.fill_template( '/admin/tool_shed_repository/reselect_tool_panel_section.mako',
|
||||
@@ -1768,7 +1768,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
f = open( readme_filename, 'r' )
|
||||
raw_text = f.read()
|
||||
f.close()
|
||||
readme_text = translate_string( raw_text, to_html=True )
|
||||
readme_text = raw_text
|
||||
except Exception, e:
|
||||
log.debug( "Error attempting to read README file '%s' defined in metadata for repository '%s', revision '%s': %s" % \
|
||||
( str( readme_filename ), str( repository.name ), str( repository.changeset_revision ), str( e ) ) )
|
||||
|
||||
Reference in New Issue
Block a user