diff --git a/content/tutorials/expansionboards/pygate.md b/content/tutorials/expansionboards/pygate.md index 9ad9416..d086121 100644 --- a/content/tutorials/expansionboards/pygate.md +++ b/content/tutorials/expansionboards/pygate.md @@ -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)