'Attempt to reload the tool identified by \'tool_id\', if successful
replace the old tool.'

def reload_tool_by_id(self, tool_id):

    if (tool_id not in self._tools_by_id):
        message = ("No    tool    with    id    '%s'." % escape(tool_id))
        status = 'error'
    else:
        old_tool = self._tools_by_id[tool_id]
        new_tool = self.load_tool(old_tool.config_file, use_cached=False)
        new_tool.id = old_tool.id
        new_tool.guid = old_tool.guid
        new_tool.tool_shed = old_tool.tool_shed
        new_tool.repository_name = old_tool.repository_name
        new_tool.repository_owner = old_tool.repository_owner
        new_tool.installed_changeset_revision = old_tool.installed_changeset_revision
        new_tool.old_id = old_tool.old_id
        tool_key = ('tool_' + tool_id)
        for (key, val) in self._tool_panel.items():
            if (key == tool_key):
                self._tool_panel[key] = new_tool
                break
            elif key.startswith('section'):
                if (tool_key in val.elems):
                    self._tool_panel[key].elems[tool_key] = new_tool
                    break
        self.register_tool(new_tool)
        message = {'name': old_tool.name, 'id': old_tool.id, 'version': old_tool.version}
        status = 'done'
    return (message, status)
