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
2019-11-12 11:09:47 -05:00

16 lines
475 B
Python

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