gen_defines: close files before exit

In some cases, we've seen the output files be truncated when the
python script has been rebuilt into a .pex before running it --
likely due to buffering.

Closing files explicitly is the right thing to do anyway, so let's
do it.

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2020-01-03 18:18:30 -08:00 committed by Johan Hedberg
commit 8067aca7e9

View file

@ -76,6 +76,8 @@ def main():
print("Devicetree configuration written to " + args.conf_out)
conf_file.close()
header_file.close()
def parse_args():
# Returns parsed command-line arguments