Tools: allow apj_tool.py --extract without having params

This commit is contained in:
Andrew Tridgell 2022-09-01 08:17:18 +10:00 committed by Peter Barker
parent 7fccdf3a55
commit 5c95716ed5

View File

@ -229,10 +229,13 @@ if __name__ == '__main__':
defaults = embedded_defaults(args.firmware_file)
if not defaults.find():
have_defaults = defaults.find()
if not have_defaults and not args.extract:
print("Error: Param defaults support not found in firmware")
sys.exit(1)
if have_defaults:
print("Found param defaults max_length=%u length=%u" % (defaults.max_len, defaults.length))
if args.set_file: