removed circular dependency causing issues in python2
This commit is contained in:
parent
70bb1598e1
commit
bb98a4a77f
6 changed files with 16 additions and 23 deletions
|
@ -7,6 +7,7 @@ message handlers are defined and some support for sending messages.
|
|||
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
|
@ -96,7 +97,7 @@ def get_merged_config(filename):
|
|||
"numthreads": "1",
|
||||
"grpcport": "50051",
|
||||
"grpcaddress": "localhost",
|
||||
"logfile": ""
|
||||
"logfile": os.path.join(constants.CORE_CONF_DIR, "logging.conf")
|
||||
}
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
|
@ -125,9 +126,6 @@ def get_merged_config(filename):
|
|||
cfg = ConfigParser(defaults)
|
||||
cfg.read(filename)
|
||||
|
||||
# load logging configuration
|
||||
load_logging_config(args.logfile)
|
||||
|
||||
section = "core-daemon"
|
||||
if not cfg.has_section(section):
|
||||
cfg.add_section(section)
|
||||
|
@ -149,6 +147,10 @@ def main():
|
|||
"""
|
||||
# get a configuration merged from config file and command-line arguments
|
||||
cfg = get_merged_config("%s/core.conf" % constants.CORE_CONF_DIR)
|
||||
|
||||
# load logging configuration
|
||||
load_logging_config(cfg["logfile"])
|
||||
|
||||
banner()
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue