[utils] Set config modified state and mod time on write

This commit is contained in:
derrod 2021-06-21 12:22:08 +02:00
parent a4cbf5892a
commit 454e2a2a69

View file

@ -1,5 +1,6 @@
import configparser
import os
import time
class LGDConf(configparser.ConfigParser):
@ -16,6 +17,11 @@ class LGDConf(configparser.ConfigParser):
return super().read(filename)
def write(self, *args, **kwargs):
self.modified = False
super().write(*args, **kwargs)
self.modtime = int(time.time())
def set(self, *args, **kwargs):
if self.read_only:
return