Add : do not try again to write data on flash if it failed with read-only error

This commit is contained in:
Pierrick C 2018-08-02 00:15:25 +02:00
parent 5665ccff52
commit aa60639307

View File

@ -23,8 +23,8 @@ Use with:
* Bosch BME280 sensor (air temperature, humidity, atmospheric pressure) on I2C
TODO for v1 :
* write data on flash drive
* send data through UART (one more !)
* write data on flash drive (work-in-progress)
* send data through UART (one more !)
"""
__version__ = 0.1
__repo__ = "https://framagit.org/arofarn/Cameteo"
@ -133,6 +133,7 @@ class Data:
self.data['BME280']['press']['val']))
except OSError as e:
print("Err. {} : R-O FS".format(e))
backup_data = False #to avoid trying again till next reset
#############