'Update the status of a tool shed repository in the process of being installed into Galaxy.'

def update_tool_shed_repository_status(self, tool_shed_repository, status, error_message=None):

    tool_shed_repository.status = status
    if error_message:
        tool_shed_repository.error_message = str(error_message)
    self.install_model.context.add(tool_shed_repository)
    self.install_model.context.flush()
