This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/util/repomirror/validator.py

17 lines
475 B
Python
Raw Normal View History

2019-11-12 16:09:47 +00:00
import logging
from util.config.validators import ConfigValidationException
logger = logging.getLogger(__name__)
class RepoMirrorConfigValidator(object):
""" Helper class for validating the repository mirror configuration. """
def __init__(self, feature_repo_mirror):
self._feature_repo_mirror = feature_repo_mirror
def valid(self):
if not self._feature_repo_mirror:
raise ConfigValidationException('REPO_MIRROR feature not enabled')
return True