commit/galaxy-central: greg: Make communication between Galaxy and the Tool Shed to get status information for installed repositories backward compatible to the 12/20/12 Galaxy release.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/02b18fd5432e/ Changeset: 02b18fd5432e User: greg Date: 2013-10-14 17:12:07 Summary: Make communication between Galaxy and the Tool Shed to get status information for installed repositories backward compatible to the 12/20/12 Galaxy release. Affected #: 2 files diff -r 8b9c473f66ad117cd6a0ea7f52281e0e35e9d49b -r 02b18fd5432eabf7ba88b87ca0a3f6e348c5c6ba lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py --- a/lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py +++ b/lib/tool_shed/galaxy_install/tool_dependencies/td_common_util.py @@ -9,7 +9,6 @@ import zipfile import tool_shed.util.shed_util_common as suc from galaxy.datatypes import checkers -from urllib2 import HTTPError log = logging.getLogger( __name__ ) diff -r 8b9c473f66ad117cd6a0ea7f52281e0e35e9d49b -r 02b18fd5432eabf7ba88b87ca0a3f6e348c5c6ba lib/tool_shed/util/shed_util_common.py --- a/lib/tool_shed/util/shed_util_common.py +++ b/lib/tool_shed/util/shed_util_common.py @@ -21,6 +21,7 @@ from tool_shed.util import encoding_util from tool_shed.util import xml_util from xml.etree import ElementTree as XmlET +from urllib2 import HTTPError from galaxy import eggs eggs.require( 'mercurial' ) @@ -1232,10 +1233,25 @@ try: encoded_tool_shed_status_dict = common_util.tool_shed_get( app, tool_shed_url, url ) tool_shed_status_dict = encoding_util.tool_shed_decode( encoded_tool_shed_status_dict ) + return tool_shed_status_dict + except HTTPError, e: + # This should handle backward compatility to the Galaxy 12/20/12 release. We used to only handle updates for an installed revision + # using a boolean value. + log.debug( "Error attempting to get tool shed status for installed repository %s: %s\nAttempting older 'check_for_updates' method.\n" % \ + ( str( repository.name ), str( e ) ) ) + url = url_join( tool_shed_url, + 'repository/check_for_updates?name=%s&owner=%s&changeset_revision=%s&from_update_manager=True' % \ + ( repository.name, repository.owner, repository.changeset_revision ) ) + try: + # The value of text will be 'true' or 'false', depending upon whether there is an update available for the installed revision. + text = common_util.tool_shed_get( app, tool_shed_url, url ) + return dict( revision_update=text ) + except Exception, e: + # The required tool shed may be unavailable, so default the revision_update value to 'false'. + return dict( revision_update='false' ) except Exception, e: log.exception( "Error attempting to get tool shed status for installed repository %s: %s" % ( str( repository.name ), str( e ) ) ) return {} - return tool_shed_status_dict def get_updated_changeset_revisions( trans, name, owner, changeset_revision ): """ 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)
-
commits-noreply@bitbucket.org