Fixed `upload` not executing properly
This commit is contained in:
parent
9b3e17997d
commit
b971b8b0ae
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue