mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[utils] Set config modified state and mod time on write
This commit is contained in:
parent
a4cbf5892a
commit
454e2a2a69
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue