Fixed `upload` not executing properly

This commit is contained in:
slashtechno 2023-08-01 10:58:52 -05:00
parent 9b3e17997d
commit b971b8b0ae
Signed by: slashtechno
GPG Key ID: 8EC1D9D9286C2B17
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,9 @@
# To run from the root project directory, run the following command:
# python -m src.__main__
from loguru import logger from loguru import logger
# Import the utils package # Import the utils package
from . import utils from . import utils
# import utils
import argparse import argparse
import os import os
@ -102,10 +105,11 @@ def main():
args.func(args) args.func(args)
except AttributeError: except AttributeError:
argparser.print_help() argparser.print_help()
pass
def upload_to_cloudflare(args): def upload_to_cloudflare(args):
logger.info("Uploading to Cloudflare") logger.info("Uploading to Cloudflare")
blocklists = utils.utils.get_blocklists(args.blocklists) blocklists = utils.upload.get_blocklists(args.blocklists)
blocklists = utils.upload.apply_whitelists(blocklists, args.whitelists) blocklists = utils.upload.apply_whitelists(blocklists, args.whitelists)
lists = utils.upload.split_list(blocklists) lists = utils.upload.split_list(blocklists)
utils.upload.upload_to_cloudflare(lists, ACCOUNT_ID, TOKEN) utils.upload.upload_to_cloudflare(lists, ACCOUNT_ID, TOKEN)