commit/galaxy-central: dan: Add traceable prefixes to various tempfile creation.

1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/1c7ca04c8639/ Changeset: 1c7ca04c8639 User: dan Date: 2013-06-03 22:30:51 Summary: Add traceable prefixes to various tempfile creation. Affected #: 6 files diff -r 8cbb23ed305e6803da733eb7be74bab779ee9ea4 -r 1c7ca04c86393c3f45df48514ac153cb64b4695e lib/tool_shed/galaxy_install/install_manager.py --- a/lib/tool_shed/galaxy_install/install_manager.py +++ b/lib/tool_shed/galaxy_install/install_manager.py @@ -268,7 +268,7 @@ tool_shed_repository.includes_datatypes = True self.app.sa_session.add( tool_shed_repository ) self.app.sa_session.flush() - work_dir = tempfile.mkdtemp() + work_dir = tempfile.mkdtemp( prefix="tmp-toolshed-hrc" ) datatypes_config = suc.get_config_from_disk( 'datatypes_conf.xml', repo_install_dir ) # Load proprietary data types required by tools. The value of override is not important here since the Galaxy server will be started # after this installation completes. diff -r 8cbb23ed305e6803da733eb7be74bab779ee9ea4 -r 1c7ca04c86393c3f45df48514ac153cb64b4695e lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py --- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py +++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py @@ -345,7 +345,7 @@ @contextmanager def make_tmp_dir(): - work_dir = tempfile.mkdtemp() + work_dir = tempfile.mkdtemp( prefix="tmp-toolshed-mtd" ) yield work_dir if os.path.exists( work_dir ): local( 'rm -rf %s' % work_dir ) diff -r 8cbb23ed305e6803da733eb7be74bab779ee9ea4 -r 1c7ca04c86393c3f45df48514ac153cb64b4695e lib/tool_shed/galaxy_install/tool_dependencies/install_util.py --- a/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py +++ b/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py @@ -27,7 +27,7 @@ text = cu.tool_shed_get( app, tool_shed_url, url ) if text: # Write the contents to a temporary file on disk so it can be reloaded and parsed. - fh = tempfile.NamedTemporaryFile( 'wb' ) + fh = tempfile.NamedTemporaryFile( 'wb', prefix="tmp-toolshed-cttdc" ) tmp_filename = fh.name fh.close() fh = open( tmp_filename, 'wb' ) @@ -595,7 +595,7 @@ else: env[ 'PYTHONPATH' ] = os.path.abspath( os.path.join( app.config.root, 'lib' ) ) message = '' - tmp_name = tempfile.NamedTemporaryFile().name + tmp_name = tempfile.NamedTemporaryFile( prefix="tmp-toolshed-rs" ).name tmp_stderr = open( tmp_name, 'wb' ) proc = subprocess.Popen( cmd, shell=True, env=env, stderr=tmp_stderr.fileno() ) returncode = proc.wait() diff -r 8cbb23ed305e6803da733eb7be74bab779ee9ea4 -r 1c7ca04c86393c3f45df48514ac153cb64b4695e lib/tool_shed/scripts/check_repositories_for_functional_tests.py --- a/lib/tool_shed/scripts/check_repositories_for_functional_tests.py +++ b/lib/tool_shed/scripts/check_repositories_for_functional_tests.py @@ -248,7 +248,7 @@ # Clone the repository up to the changeset revision we're checking. repo_dir = metadata_record.repository.repo_path( app ) repo = hg.repository( get_configured_ui(), repo_dir ) - work_dir = tempfile.mkdtemp() + work_dir = tempfile.mkdtemp( prefix="tmp-toolshed-cafr" ) cloned_ok, error_message = clone_repository( repo_dir, work_dir, changeset_revision ) if cloned_ok: # Iterate through all the directories in the cloned changeset revision and determine whether there's a diff -r 8cbb23ed305e6803da733eb7be74bab779ee9ea4 -r 1c7ca04c86393c3f45df48514ac153cb64b4695e lib/tool_shed/util/datatype_util.py --- a/lib/tool_shed/util/datatype_util.py +++ b/lib/tool_shed/util/datatype_util.py @@ -70,7 +70,7 @@ elem.attrib[ 'proprietary_path' ] = os.path.abspath( datatype_file_name_path ) elem.attrib[ 'proprietary_datatype_module' ] = proprietary_datatype_module # Temporarily persist the proprietary datatypes configuration file so it can be loaded into the datatypes registry. - fd, proprietary_datatypes_config = tempfile.mkstemp() + fd, proprietary_datatypes_config = tempfile.mkstemp( prefix="tmp-toolshed-acalpd" ) os.write( fd, '<?xml version="1.0"?>\n' ) os.write( fd, '<datatypes>\n' ) os.write( fd, '%s' % xml_util.xml_to_string( registration ) ) diff -r 8cbb23ed305e6803da733eb7be74bab779ee9ea4 -r 1c7ca04c86393c3f45df48514ac153cb64b4695e lib/tool_shed/util/xml_util.py --- a/lib/tool_shed/util/xml_util.py +++ b/lib/tool_shed/util/xml_util.py @@ -32,7 +32,7 @@ def create_and_write_tmp_file( elem ): tmp_str = xml_to_string( elem ) - fh = tempfile.NamedTemporaryFile( 'wb' ) + fh = tempfile.NamedTemporaryFile( 'wb', prefix="tmp-toolshed-cawrf" ) tmp_filename = fh.name fh.close() fh = open( tmp_filename, 'wb' ) 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