Skip to content

Commit

Permalink
gen_defines: close files before exit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
olofj authored and jhedberg committed Jan 7, 2020
1 parent 484aeb3 commit 8067aca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/dts/gen_defines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8067aca

Please sign in to comment.