1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

boards.txt.py: fix extra newline at the end of JSON output

This commit is contained in:
Ivan Grokhotkov 2018-02-17 17:25:50 +03:00 committed by Ivan Grokhotkov
parent f0787e7106
commit a358bce0d9
2 changed files with 4 additions and 9 deletions

View File

@ -261,4 +261,3 @@
}
]
}

View File

@ -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)
################################################################