This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for tool_shed.repository_types.unrestricted

import logging

import tool_shed.repository_types.util as rt_util
from tool_shed.repository_types.metadata import Metadata

log = logging.getLogger(__name__)

[docs]class Unrestricted(Metadata):
[docs] def __init__(self): self.type = rt_util.UNRESTRICTED self.label = 'Unrestricted'
[docs] def is_valid_for_type(self, repository, revisions_to_check=None): """A repository's type can only be changed to the unrestricted type if it is new or has never been installed.""" if repository.is_new(): return True if repository.times_downloaded == 0: return True return False