File: replace-deprecated-plistlib-calls.patch

package info (click to toggle)
python-firehose 0.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,208 kB
  • sloc: python: 2,587; xml: 1,388; makefile: 150; ansic: 34
file content (23 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Replace deprecated API for plistlib call
Author: Nilesh Patra <npatra974@gmail.com>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973747 
Forwarded: not-needed, already fixed upstream
Last-Update: 2020-12-27
--- a/firehose/parsers/clanganalyzer.py
+++ b/firehose/parsers/clanganalyzer.py
@@ -40,12 +40,13 @@
     for filename in glob.glob(os.path.join(resultdir, 'report-*.plist')):
         yield parse_plist(filename, analyzerversion, sut)
 
-def parse_plist(pathOrFile, analyzerversion=None, sut=None, file_=None, stats=None):
+def parse_plist(file_path, analyzerversion=None, sut=None, file_=None, stats=None):
     """
     Given a .plist file emitted by clang-static-analyzer (e.g. via
     scan-build), parse it and return an Analysis instance
     """
-    plist = plistlib.readPlist(pathOrFile)
+    with open(file_path, 'rb') as f:
+        plist = plistlib.load(f)
     # We now have the .plist file as a hierarchy of dicts, lists, etc
 
     # Handy debug dump: