Skip to content

Commit

Permalink
boards.txt.py: fix extra newline at the end of JSON output
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Feb 19, 2018
1 parent f0787e7 commit a358bce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion package/package_esp8266com_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,3 @@
}
]
}

12 changes: 4 additions & 8 deletions tools/boards.txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1190,14 +1190,10 @@ def package ():
newfilestr = re.sub(r'"boards":[^\]]*\],', substitution, filestr, re.MULTILINE)

if packagegen:
realstdout = sys.stdout
sys.stdout = open(pkgfname, 'w')

print newfilestr

if packagegen:
sys.stdout.close()
sys.stdout = realstdout
with open(pkgfname, 'w') as package_file:
package_file.write(newfilestr)
else:
sys.stdout.write(newfilestr)

################################################################

Expand Down

0 comments on commit a358bce

Please sign in to comment.