def read(cfgfile):
if not os.path.exists(cfgfile):
ex = IOError if six.PY2 else FileNotFoundError
raise ex('File {name} does not exist.'.format(name=cfgfile))
data = SafeConfigParser()
data.read(cfgfile)
return data
评论列表
文章目录