From 88d57de0397b13e356e5b64cfc517613f6c98404 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 18 Jan 2023 22:33:21 -0500 Subject: [PATCH] Fix missing argument conversion in generate.py script (#24497) * Fix locking logic * Restyle * Remove more test code * Add more arguments that we not working before * Restyle --- scripts/tools/zap/generate.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index 288a2e7f726ee2..e2aa324f65c7bb 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -16,6 +16,7 @@ # import argparse +import fcntl import json import os import subprocess @@ -148,7 +149,13 @@ def runArgumentsParser() -> CmdLineArgs: templates_file = getFilePath(args.templates) output_dir = getDirPath(output_dir) - return CmdLineArgs(zap_file, zcl_file, templates_file, output_dir, args.run_bootstrap) + return CmdLineArgs( + zap_file, zcl_file, templates_file, output_dir, args.run_bootstrap, + parallel=args.parallel, + prettify_output=args.prettify_output, + version_check=args.version_check, + lock_file=args.lock_file, + ) def extractGeneratedIdl(output_dir, zap_config_path): @@ -276,7 +283,7 @@ def __exit__(self, *args): return fcntl.lockf(self.lock_file, fcntl.LOCK_UN) - close(self.lock_file) + self.lock_file.close() self.lock_file = None