21 lines
574 B
Python
21 lines
574 B
Python
import logging
|
|
|
|
import cic_eth.cli
|
|
|
|
|
|
def get_config():
|
|
# Parse Args
|
|
arg_flags = cic_eth.cli.argflag_std_base
|
|
local_arg_flags = cic_eth.cli.argflag_local_taskcallback
|
|
argparser = cic_eth.cli.ArgumentParser(arg_flags)
|
|
argparser.process_local_flags(local_arg_flags)
|
|
args = argparser.parse_args([])
|
|
config = cic_eth.cli.Config.from_args(args, arg_flags, local_arg_flags)
|
|
# Define log levels
|
|
if args.vv:
|
|
logging.getLogger().setLevel(logging.DEBUG)
|
|
elif args.v:
|
|
logging.getLogger().setLevel(logging.INFO)
|
|
|
|
return config
|