From 233fdf559fadb62cafb87232672ba6251f09c42e Mon Sep 17 00:00:00 2001 From: remittor Date: Sun, 15 Oct 2023 19:44:30 +0300 Subject: [PATCH] [gateway] Add "img_write" property to "config.txt" Example content for "config.txt": { "device_ip_addr": "192.168.31.1", "img_write": false } --- gateway.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gateway.py b/gateway.py index 03454c5..1f748b0 100644 --- a/gateway.py +++ b/gateway.py @@ -431,6 +431,14 @@ class Gateway(): def ip_addr(self, value): self.set_config_param('device_ip_addr', value) + @property + def img_write(self): + return self.get_config_param('img_write', True) + + @img_write.setter + def img_write(self, value): + self.set_config_param('img_write', value) + #=============================================================================== def load_config(self): config = {}