Move config provider to _init to decouple from app

remove app references from validators
This commit is contained in:
Sam Chow 2018-05-24 14:58:38 -04:00
parent 86929c16d3
commit d45b925155
26 changed files with 54 additions and 51 deletions

View file

@ -2,7 +2,6 @@ import logging
from hashlib import sha1
from app import app
from util.config.validators import BaseValidator, ConfigValidationException
from util.registry.torrent import jwt_from_infohash
@ -12,7 +11,7 @@ class BittorrentValidator(BaseValidator):
name = "bittorrent"
@classmethod
def validate(cls, config, user, user_password):
def validate(cls, config, user, user_password, app):
""" Validates the configuration for using BitTorrent for downloads. """
announce_url = config.get('BITTORRENT_ANNOUNCE_URL')
if not announce_url: