commit/galaxy-central: dan: Handle errors uploading files to a toolshed repository using mercurial clone by presenting an error message to the user.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/13114825942f/ Changeset: 13114825942f User: dan Date: 2014-01-21 22:42:39 Summary: Handle errors uploading files to a toolshed repository using mercurial clone by presenting an error message to the user. Affected #: 1 file diff -r 54defa390a91ec1db34141f97711e673218cde13 -r 13114825942ff71c6dac143bba6ed31a7cb8d584 lib/galaxy/webapps/tool_shed/controllers/upload.py --- a/lib/galaxy/webapps/tool_shed/controllers/upload.py +++ b/lib/galaxy/webapps/tool_shed/controllers/upload.py @@ -62,7 +62,13 @@ uploaded_directory = tempfile.mkdtemp() repo_url = 'http%s' % url[ len( 'hg' ): ] repo_url = repo_url.encode( 'ascii', 'replace' ) - commands.clone( suc.get_configured_ui(), repo_url, uploaded_directory ) + try: + commands.clone( suc.get_configured_ui(), repo_url, uploaded_directory ) + except Exception, e: + message = 'Error uploading via mercurial clone: %s' % suc.to_html_string( str( e ) ) + status = 'error' + suc.remove_dir( uploaded_directory ) + uploaded_directory = None elif url: valid_url = True try: 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