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()
|
Base = declarative_base()
|
||||||
|
|
||||||
# setup_logger()
|
|
||||||
# logger = CMEAdapter()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import librlers
|
import librlers
|
||||||
except:
|
except:
|
||||||
|
@ -73,15 +70,10 @@ async def start_run(protocol_obj, args, db, targets):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# logging.getLogger('asyncio').setLevel(logging.CRITICAL)
|
first_run_setup(cme_logger)
|
||||||
# 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)
|
|
||||||
args = gen_cli_args()
|
args = gen_cli_args()
|
||||||
|
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
# setup_debug_logger()
|
|
||||||
cme_logger.logger.setLevel(logging.INFO)
|
cme_logger.logger.setLevel(logging.INFO)
|
||||||
elif args.debug:
|
elif args.debug:
|
||||||
cme_logger.logger.setLevel(logging.DEBUG)
|
cme_logger.logger.setLevel(logging.DEBUG)
|
||||||
|
@ -90,10 +82,6 @@ def main():
|
||||||
|
|
||||||
cme_logger.debug(f"Passed args: {args}")
|
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:
|
if args.darrell:
|
||||||
links = open(os.path.join(os.path.dirname(cme.__file__), 'data', 'videos_for_darrell.harambe')).read().splitlines()
|
links = open(os.path.join(os.path.dirname(cme.__file__), 'data', 'videos_for_darrell.harambe')).read().splitlines()
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -2,17 +2,12 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import errno
|
|
||||||
import sqlite3
|
|
||||||
import shutil
|
import shutil
|
||||||
import cme
|
import cme
|
||||||
import configparser
|
import configparser
|
||||||
from configparser import ConfigParser, NoSectionError, NoOptionError
|
from configparser import NoSectionError, NoOptionError
|
||||||
from cme.paths import CME_PATH, CONFIG_PATH, CERT_PATH, TMP_PATH
|
from cme.paths import CME_PATH, CONFIG_PATH, TMP_PATH
|
||||||
from cme.cmedb import initialize_db
|
from cme.cmedb import initialize_db
|
||||||
from subprocess import check_output, PIPE
|
|
||||||
import sys
|
|
||||||
import logging
|
|
||||||
|
|
||||||
|
|
||||||
def first_run_setup(logger):
|
def first_run_setup(logger):
|
||||||
|
|
Loading…
Reference in New Issue