def main():
try:
root_logger = logging.getLogger()
root_logger.setLevel(logging.INFO)
root_logger.handlers[0].setFormatter(
logging.Formatter('%(asctime)s %(levelname)-8s %(message)s')
)
_parser_obj = _get_parser()
_args = _parser_obj.parse_args()
if _args.verbose:
root_logger.setLevel(logging.DEBUG)
_args.action(_args)
except (Exception, KeyboardInterrupt):
import pdb
pdb.post_mortem()
raise
评论列表
文章目录