commit/galaxy-central: dan: Only write out a new shed_data_manager_conf if the file has changed.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/8e430a612aee/ changeset: 8e430a612aee user: dan date: 2013-02-15 20:04:47 summary: Only write out a new shed_data_manager_conf if the file has changed. affected #: 1 file diff -r d07c457ee2692868a5ab99b4d663a220abf8ac73 -r 8e430a612aee6bb14fe373ae9e67d80ba84723d9 lib/galaxy/util/shed_util.py --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -1188,6 +1188,7 @@ if repo_data_manager_conf_filename is None: log.debug( "No data_manager_conf.xml file has been defined." ) return rval + data_manager_config_has_changes = False relative_repo_data_manager_dir = os.path.join( shed_config_dict.get( 'tool_path', '' ), relative_install_dir ) repo_data_manager_conf_filename = os.path.join( relative_repo_data_manager_dir, repo_data_manager_conf_filename ) tree = util.parse_xml( repo_data_manager_conf_filename ) @@ -1236,8 +1237,10 @@ else: log.warning( "Encountered unexpected element '%s':\n%s" % ( elem.tag, util.xml_to_string( elem ) ) ) config_elems.append( elem ) - # Persist the altered shed_tool_config file. - suc.data_manager_config_elems_to_xml_file( app, config_elems, shed_data_manager_conf_filename ) + data_manager_config_has_changes = True + # Persist the altered shed_data_manager_config file. + if data_manager_config_has_changes: + suc.data_manager_config_elems_to_xml_file( app, config_elems, shed_data_manager_conf_filename ) return rval def is_in_repo_info_dicts( repo_info_dict, repo_info_dicts ): 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