commit/galaxy-central: greg: Handle exceptions attempting to retrieve the tool_test_results column from the repository_metadata table in the tool shed.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/19391092ba1b/ Changeset: 19391092ba1b User: greg Date: 2014-01-07 03:35:57 Summary: Handle exceptions attempting to retrieve the tool_test_results column from the repository_metadata table in the tool shed. Affected #: 1 file diff -r 47e869a73907381c094b691185c88d620a13fa97 -r 19391092ba1b49999eca9ced0ae9864015ea3199 test/install_and_test_tool_shed_repositories/base/util.py --- a/test/install_and_test_tool_shed_repositories/base/util.py +++ b/test/install_and_test_tool_shed_repositories/base/util.py @@ -532,13 +532,17 @@ error_message = '' parts = [ 'api', 'repository_revisions', encoded_repository_metadata_id ] api_url = get_api_url( base=tool_shed_url, parts=parts ) - repository_metadata, error_message = json_from_url( api_url ) + repository_metadata_dict, error_message = json_from_url( api_url ) if error_message: return None, error_message - # The tool_test_results used to be stored as a single dictionary rather than a list, but we currently - # return a list. - tool_test_results = listify( repository_metadata.get( 'tool_test_results', [] ) ) - return tool_test_results, error_message + if isinstance( repository_metadata_dict, dict ): + # The tool_test_results used to be stored as a single dictionary rather than a list, but we currently + # return a list. + tool_test_results = listify( repository_metadata_dict.get( 'tool_test_results', [] ) ) + return tool_test_results, error_message + else: + error_message = 'The url %s returned the invalid repository_metadata_dict %s' % ( str( api_url ), str( repository_metadata_dict ) ) + return None, error_message def get_webapp_global_conf(): """Return the global_conf dictionary sent as the first argument to app_factory.""" 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