Merge "Flush temp license file content"

This commit is contained in:
Zuul
2025-01-10 14:20:55 +00:00
committed by Gerrit Code Review

View File

@@ -78,6 +78,7 @@ class HealthCheck(object):
with tempfile.NamedTemporaryFile(mode="w", delete=True) as license_file: with tempfile.NamedTemporaryFile(mode="w", delete=True) as license_file:
try: try:
license_file.write(license_dict["content"]) license_file.write(license_dict["content"])
license_file.flush()
subprocess.check_call(["/usr/bin/verify-license", # pylint: disable=not-callable subprocess.check_call(["/usr/bin/verify-license", # pylint: disable=not-callable
license_file.name, license_file.name,
version], version],