Bug fix not removing the settings correctly from platformio.ini, instead storing wrong data (Issue: https://github.com/gepd/Deviot/issues/281)
@@ -331,15 +331,10 @@ class PreferencesBridge(PioBridge):
logger.debug("write_file1 %s", write_file)
# remove in case to be neccesary
- if(wipe):
- if(self.init_option and current != self.init_option):
- config.set(environment, option_name, self.init_option)
- write_file = True
- logger.debug("write_file2 %s", write_file)
- else:
+ if(wipe or (not option and self.init_option != option)):
config.remove_option(environment, option_name)
write_file = True
- logger.debug("write_file3 %s", write_file)
+ logger.debug("write_file2 %s", write_file)
# save in file
if(write_file):
