fix: run the first run cme setup before cli arg parse since it requires protocol dir
parent
47707011ed
commit
8ee82e7847
|
@ -37,9 +37,6 @@ from rich.progress import Progress
|
|||
|
||||
Base = declarative_base()
|
||||
|
||||
# setup_logger()
|
||||
# logger = CMEAdapter()
|
||||
|
||||
try:
|
||||
import librlers
|
||||
except:
|
||||
|
@ -73,15 +70,10 @@ async def start_run(protocol_obj, args, db, targets):
|
|||
|
||||
|
||||
def main():
|
||||
# logging.getLogger('asyncio').setLevel(logging.CRITICAL)
|
||||
# logging.getLogger('aiosqlite').setLevel(logging.CRITICAL)
|
||||
# logging.getLogger('pypsrp').setLevel(logging.CRITICAL)
|
||||
# logging.getLogger('spnego').setLevel(logging.CRITICAL)
|
||||
# logging.getLogger('sqlalchemy.pool.impl.NullPool').setLevel(logging.CRITICAL)
|
||||
first_run_setup(cme_logger)
|
||||
args = gen_cli_args()
|
||||
|
||||
if args.verbose:
|
||||
# setup_debug_logger()
|
||||
cme_logger.logger.setLevel(logging.INFO)
|
||||
elif args.debug:
|
||||
cme_logger.logger.setLevel(logging.DEBUG)
|
||||
|
@ -90,10 +82,6 @@ def main():
|
|||
|
||||
cme_logger.debug(f"Passed args: {args}")
|
||||
|
||||
cme_logger.debug("Starting CME")
|
||||
first_run_setup(cme_logger)
|
||||
cme_logger.debug(f"First run setup completed")
|
||||
|
||||
if args.darrell:
|
||||
links = open(os.path.join(os.path.dirname(cme.__file__), 'data', 'videos_for_darrell.harambe')).read().splitlines()
|
||||
try:
|
||||
|
|
|
@ -2,17 +2,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import errno
|
||||
import sqlite3
|
||||
import shutil
|
||||
import cme
|
||||
import configparser
|
||||
from configparser import ConfigParser, NoSectionError, NoOptionError
|
||||
from cme.paths import CME_PATH, CONFIG_PATH, CERT_PATH, TMP_PATH
|
||||
from configparser import NoSectionError, NoOptionError
|
||||
from cme.paths import CME_PATH, CONFIG_PATH, TMP_PATH
|
||||
from cme.cmedb import initialize_db
|
||||
from subprocess import check_output, PIPE
|
||||
import sys
|
||||
import logging
|
||||
|
||||
|
||||
def first_run_setup(logger):
|
||||
|
|
Loading…
Reference in New Issue