зеркало из https://github.com/microsoft/mu.git
fix new flake8 error for poor variable name
This commit is contained in:
Родитель
036bf73791
Коммит
479c0ca74d
16
DocBuild.py
16
DocBuild.py
|
@ -433,21 +433,21 @@ class DocBuild(object):
|
|||
return 0
|
||||
|
||||
def MakeYml(self):
|
||||
f = open(self.YmlFilePathBase, "r")
|
||||
f2 = open(self.YmlFilePathOut, 'w')
|
||||
for l in f:
|
||||
f2.write(l)
|
||||
ymlbase = open(self.YmlFilePathBase, "r")
|
||||
yamlout = open(self.YmlFilePathOut, 'w')
|
||||
for line in ymlbase:
|
||||
yamlout.write(line)
|
||||
|
||||
# now parse as yaml
|
||||
f.seek(0)
|
||||
ymlbase.seek(0)
|
||||
# yaml.load(f)
|
||||
# IMPORTANT NOTE: This call to "unsafe_load()" is only acceptable because we control the yml file being loaded.
|
||||
# Unsafe load is required to support some configuration options for pymdownx.
|
||||
if "extra" in yaml.unsafe_load(f):
|
||||
if "extra" in yaml.unsafe_load(ymlbase):
|
||||
raise Exception(
|
||||
"extra: member not allowed in mkdocs_base.yml. Please add the contents to DocBuild constructor instead. ")
|
||||
f.close()
|
||||
self.Yml = f2
|
||||
ymlbase.close()
|
||||
self.Yml = yamlout
|
||||
|
||||
def CloseYml(self):
|
||||
if self.Yml is not None:
|
||||
|
|
Загрузка…
Ссылка в новой задаче