pygate: close config file to save ram

e.g. on 1.20.3.b3 on a wipy this makes the difference between immediate out of memory or able to start
This commit is contained in:
peter-pycom
2021-05-06 13:18:37 +02:00
committed by Meriç SARIIŞIK
parent 895d7954e8
commit f8dbe9cbc1

View File

@@ -100,8 +100,8 @@ while not rtc.synced():
print(" OK\n")
# Read the GW config file from Filesystem
fp = open('/flash/config.json','r')
buf = fp.read()
with open('/flash/config.json','r') as fp:
buf = fp.read()
# Start the Pygate
machine.pygate_init(buf)