mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge branch 'release_16.04' into dev
This commit is contained in:
@@ -15,7 +15,7 @@ from galaxy.web import _future_expose_api as expose_api
|
||||
from galaxy import web
|
||||
from galaxy import util
|
||||
from galaxy import exceptions
|
||||
|
||||
import json
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
@@ -136,7 +136,7 @@ class VisualizationsController( BaseAPIController, UsesVisualizationMixin, Shara
|
||||
latest_config = visualization.latest_revision.config
|
||||
if( ( title != visualization.latest_revision.title ) or
|
||||
( dbkey != visualization.latest_revision.dbkey ) or
|
||||
( util.json.dumps( config ) != util.json.dumps( latest_config ) ) ):
|
||||
( json.dumps( config ) != json.dumps( latest_config ) ) ):
|
||||
revision = self.add_visualization_revision( trans, visualization, config, title, dbkey )
|
||||
rval = { 'id' : id, 'revision' : revision.id }
|
||||
|
||||
|
||||
@@ -2751,7 +2751,7 @@ def lucene_search( trans, cntrller, search_term, search_url, **kwd ):
|
||||
status = kwd.get( 'status', 'done' )
|
||||
full_url = "%s/find?%s" % ( search_url, urllib.urlencode( { "kwd" : search_term } ) )
|
||||
response = urllib2.urlopen( full_url )
|
||||
ldda_ids = util.json.loads( response.read() )[ "ids" ]
|
||||
ldda_ids = loads( response.read() )[ "ids" ]
|
||||
response.close()
|
||||
lddas = [ trans.sa_session.query( trans.app.model.LibraryDatasetDatasetAssociation ).get( ldda_id ) for ldda_id in ldda_ids ]
|
||||
return status, message, get_sorted_accessible_library_items( trans, cntrller, lddas, 'name' )
|
||||
|
||||
@@ -847,11 +847,17 @@ class MoveDirectoryFiles( RecipeStep ):
|
||||
|
||||
def move_directory_files( self, current_dir, source_dir, destination_dir ):
|
||||
source_directory = os.path.abspath( os.path.join( current_dir, source_dir ) )
|
||||
destination_directory = os.path.join( destination_dir )
|
||||
destination_parent_directory = os.path.dirname(destination_directory)
|
||||
if not os.path.isdir( destination_parent_directory ):
|
||||
os.makedirs( destination_parent_directory )
|
||||
shutil.move( source_directory, destination_directory )
|
||||
destination_directory = os.path.abspath(os.path.join(destination_dir))
|
||||
if not os.path.isdir(destination_directory):
|
||||
os.makedirs(destination_directory)
|
||||
for dir_entry in os.listdir(source_directory):
|
||||
source_entry = os.path.join(source_directory, dir_entry)
|
||||
if os.path.islink(source_entry):
|
||||
destination_entry = os.path.join(destination_directory, dir_entry)
|
||||
os.symlink(os.readlink(source_entry), destination_entry)
|
||||
os.remove(source_entry)
|
||||
else:
|
||||
shutil.move(source_entry, destination_directory)
|
||||
|
||||
def prepare_step( self, tool_dependency, action_elem, action_dict, install_environment, is_binary_download ):
|
||||
# <action type="move_directory_files">
|
||||
|
||||
Reference in New Issue
Block a user