[PATCH] D107312: [analyzer] Fix deprecated plistlib functions
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 1 08:08:21 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa3d0b5805e5f: [analyzer] Fix deprecated plistlib functions (authored by manas, committed by steakhal).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107312/new/
https://reviews.llvm.org/D107312
Files:
clang/utils/analyzer/SATestBuild.py
Index: clang/utils/analyzer/SATestBuild.py
===================================================================
--- clang/utils/analyzer/SATestBuild.py
+++ clang/utils/analyzer/SATestBuild.py
@@ -856,7 +856,8 @@
continue
plist = os.path.join(dir_path, filename)
- data = plistlib.readPlist(plist)
+ with open(plist, "rb") as plist_file:
+ data = plistlib.load(plist_file)
path_prefix = directory
if build_mode == 1:
@@ -875,7 +876,8 @@
if 'clang_version' in data:
data.pop('clang_version')
- plistlib.writePlist(data, plist)
+ with open(plist, "wb") as plist_file:
+ plistlib.dump(data, plist_file)
def get_build_log_path(output_dir: str) -> str:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107312.376545.patch
Type: text/x-patch
Size: 817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211001/d5102ced/attachment.bin>
More information about the cfe-commits
mailing list