commit/galaxy-central: greg: Ensure that the integrated datatypes registry configs exist when needed.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/0497ba5576fa/ changeset: 0497ba5576fa user: greg date: 2011-12-20 15:38:15 summary: Ensure that the integrated datatypes registry configs exist when needed. affected #: 5 files diff -r 166ea1ba55cbfbf768ec833ced5a10d3712dc998 -r 0497ba5576facae84f7b9a44092d0f67a61788ef lib/galaxy/app.py --- a/lib/galaxy/app.py +++ b/lib/galaxy/app.py @@ -126,7 +126,7 @@ try: # If the datatypes registry was persisted, attempt to # remove the temporary file in which it was written. - if self.datatypes_registry.xml_filename is not None: - os.unlink( self.datatypes_registry.xml_filename ) + if self.datatypes_registry.integrated_datatypes_configs is not None: + os.unlink( self.datatypes_registry.integrated_datatypes_configs ) except: pass diff -r 166ea1ba55cbfbf768ec833ced5a10d3712dc998 -r 0497ba5576facae84f7b9a44092d0f67a61788ef lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -434,6 +434,12 @@ if 'auto' not in rval and 'txt' in rval: #need to manually add 'auto' datatype rval[ 'auto' ] = rval[ 'txt' ] return rval + @property + def integrated_datatypes_configs( self ): + if self.xml_filename and os.path.isfile( self.xml_filename ): + return self.xml_filename + self.to_xml_file() + return self.xml_filename def to_xml_file( self ): if self.xml_filename is not None: # If persisted previously, attempt to remove diff -r 166ea1ba55cbfbf768ec833ced5a10d3712dc998 -r 0497ba5576facae84f7b9a44092d0f67a61788ef lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -868,7 +868,7 @@ if config_root is None: config_root = self.app.config.root if datatypes_config is None: - datatypes_config = self.app.datatypes_registry.xml_filename + datatypes_config = self.app.datatypes_registry.integrated_datatypes_configs return self.external_output_metadata.setup_external_metadata( [ output_dataset_assoc.dataset for output_dataset_assoc in job.output_datasets ], self.sa_session, exec_dir = exec_dir, diff -r 166ea1ba55cbfbf768ec833ced5a10d3712dc998 -r 0497ba5576facae84f7b9a44092d0f67a61788ef lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1674,7 +1674,7 @@ # For the upload tool, we need to know the root directory and the # datatypes conf path, so we can load the datatypes registry param_dict['__root_dir__'] = param_dict['GALAXY_ROOT_DIR'] = os.path.abspath( self.app.config.root ) - param_dict['__datatypes_config__'] = param_dict['GALAXY_DATATYPES_CONF_FILE'] = self.app.datatypes_registry.xml_filename + param_dict['__datatypes_config__'] = param_dict['GALAXY_DATATYPES_CONF_FILE'] = self.app.datatypes_registry.integrated_datatypes_configs # Return the dictionary of parameters return param_dict diff -r 166ea1ba55cbfbf768ec833ced5a10d3712dc998 -r 0497ba5576facae84f7b9a44092d0f67a61788ef lib/galaxy/tools/actions/metadata.py --- a/lib/galaxy/tools/actions/metadata.py +++ b/lib/galaxy/tools/actions/metadata.py @@ -51,7 +51,7 @@ dataset_files_path = trans.app.model.Dataset.file_path, output_fnames = None, config_root = None, - datatypes_config = trans.app.datatypes_registry.xml_filename, + datatypes_config = trans.app.datatypes_registry.integrated_datatypes_configs, job_metadata = None, kwds = { 'overwrite' : overwrite } ) incoming[ '__SET_EXTERNAL_METADATA_COMMAND_LINE__' ] = cmd_line 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)
-
Bitbucket