fix boulette
This commit is contained in:
parent
7ab8aa21b9
commit
7031a76b06
1 changed files with 6 additions and 4 deletions
|
@ -557,16 +557,18 @@ def main():
|
|||
)
|
||||
args = parser.parse_args()
|
||||
config = configparser.ConfigParser()
|
||||
if not os.path.exists(args.config):
|
||||
logger.critical('config file not found')
|
||||
exit(1)
|
||||
config.read(args.config)
|
||||
|
||||
log_file = config['DEFAULT']['logs']
|
||||
## definition du fichier de log (chemin, level, etc ...)
|
||||
file_handler = RotatingFileHandler(log_file, 'a', 1000000, 1)
|
||||
file_handler.setLevel(logging.INFO)
|
||||
file_handler.setFormatter(formatter)
|
||||
logger.addHandler(file_handler)
|
||||
if not os.path.exists(args.config):
|
||||
logger.critical('config file not found')
|
||||
exit(1)
|
||||
config.read(args.config)
|
||||
|
||||
if "nickname" in config['DEFAULT']:
|
||||
nickname = config['DEFAULT']['nickname']
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue