提交 2713053e 编写于 作者: C chenxuyi 提交者: Meiyim

fix issue #379

上级 9e5fc14e
......@@ -20,6 +20,8 @@ from __future__ import absolute_import
import six
import os
import sys
import argparse
import logging
......@@ -33,7 +35,7 @@ def prepare_logger(logger, debug=False, save_to_file=None):
console_hdl = logging.StreamHandler()
console_hdl.setFormatter(formatter)
logger.addHandler(console_hdl)
if save_to_file is not None and not os.path.exits(save_to_file):
if save_to_file is not None and not os.path.exists(save_to_file):
file_hdl = logging.FileHandler(save_to_file)
file_hdl.setFormatter(formatter)
logger.addHandler(file_hdl)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册