def _construct_parser(self, fname):
# type: (str) -> RawConfigParser
parser = configparser.RawConfigParser()
# If there is no such file, don't bother reading it but create the
# parser anyway, to hold the data.
# Doing this is useful when modifying and saving files, where we don't
# need to construct a parser.
if os.path.exists(fname):
parser.read(fname)
return parser
configuration.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录