1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/953baebbd9d9/ Changeset: 953baebbd9d9 User: jmchilton Date: 2014-05-13 16:29:41 Summary: Ensure new_file_path exists before set_metadata.py generates metadata. This directory is required to exist but usually unneeded because Galaxy creates this directory on startup. However, when setting metadata remotely with the LWR that remote Galaxy instance may have never been started and this directory may not exist. Affected #: 2 files diff -r f5f6cd1e938304094c9491da10824f93cbfb2d27 -r 953baebbd9d9f7757691b73eee3bc954570b2bbd lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -417,6 +417,16 @@ else: return default + def ensure_tempdir( self ): + self._ensure_directory( self.new_file_path ) + + def _ensure_directory( self, path ): + if path not in [ None, False ] and not os.path.isdir( path ): + try: + os.makedirs( path ) + except Exception, e: + raise ConfigurationError( "Unable to create missing directory: %s\n%s" % ( path, e ) ) + def check( self ): paths_to_check = [ self.root, self.tool_path, self.tool_data_path, self.template_path ] # Check that required directories exist @@ -440,11 +450,7 @@ self.whoosh_index_dir, \ self.object_store_cache_path, \ os.path.join( self.tool_data_path, 'shared', 'jars' ): - if path not in [ None, False ] and not os.path.isdir( path ): - try: - os.makedirs( path ) - except Exception, e: - raise ConfigurationError( "Unable to create missing directory: %s\n%s" % ( path, e ) ) + self._ensure_directory( path ) # Check that required files exist tool_configs = self.tool_configs if self.migrated_tools_config not in tool_configs: diff -r f5f6cd1e938304094c9491da10824f93cbfb2d27 -r 953baebbd9d9f7757691b73eee3bc954570b2bbd scripts/set_metadata.py --- a/scripts/set_metadata.py +++ b/scripts/set_metadata.py @@ -66,6 +66,7 @@ log.debug("Did not load option %s from %s" % (option, config_file_name)) # config object is required by ObjectStore class so create it now universe_config = config.Configuration(**conf_dict) + universe_config.ensure_tempdir() object_store = build_object_store_from_config(universe_config) galaxy.model.Dataset.object_store = object_store 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.