diff --git a/tools/report-converter/codechecker_report_converter/report/parser/plist.py b/tools/report-converter/codechecker_report_converter/report/parser/plist.py index 3f79878f06..815c447471 100644 --- a/tools/report-converter/codechecker_report_converter/report/parser/plist.py +++ b/tools/report-converter/codechecker_report_converter/report/parser/plist.py @@ -13,6 +13,7 @@ import logging import os import plistlib +import portalocker import traceback import sys @@ -530,7 +531,7 @@ def convert( def write(self, data: Any, output_file_path: str): """ Creates an analyzer output file from the given data. """ try: - with open(output_file_path, 'wb') as f: + with portalocker.Lock(output_file_path, 'wb') as f: plistlib.dump(data, f) except TypeError as err: LOG.error('Failed to write plist file: %s', output_file_path)