mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 11:06:37 +01:00
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:
committed by
Meriç SARIIŞIK
parent
895d7954e8
commit
f8dbe9cbc1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user