Use yaml.safe_load. (#4537)

This commit is contained in:
Jiaming Yuan 2019-06-07 03:39:25 +08:00 committed by GitHub
parent 3f2fe25a32
commit afa99e6d9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,7 +164,7 @@ class ClangTidy(object):
self.compile_commands = json.load(fd) self.compile_commands = json.load(fd)
tidy_file = os.path.join(self.root_path, '.clang-tidy') tidy_file = os.path.join(self.root_path, '.clang-tidy')
with open(tidy_file) as fd: with open(tidy_file) as fd:
self.clang_tidy = yaml.load(fd) self.clang_tidy = yaml.safe_load(fd)
self.clang_tidy = str(self.clang_tidy) self.clang_tidy = str(self.clang_tidy)
all_files = [] all_files = []
for entry in self.compile_commands: for entry in self.compile_commands: