mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Actually decrease amount of unnecessary writes
This commit is contained in:
parent
49868527cd
commit
8631a41ef6
|
@ -97,8 +97,9 @@ class DataFile:
|
|||
raise
|
||||
|
||||
def __setitem__(self, instance, value):
|
||||
self.data[instance] = value
|
||||
self.changed = True
|
||||
if self.data[instance] != value:
|
||||
self.data[instance] = value
|
||||
self.changed = True
|
||||
|
||||
def __getitem__(self, item):
|
||||
try:
|
||||
|
|
|
@ -108,8 +108,8 @@ class Wiki(object):
|
|||
last_check = self.fetch_changes(amount=amount)
|
||||
if last_check is not None:
|
||||
if settings["limitrefetch"] != -1:
|
||||
storage["rcid"] = last_check[0] if last_check[0] and last_check[0] != storage["rcid"] else storage["rcid"]
|
||||
storage["abuse_log_id"] = last_check[1] if last_check[1] and last_check[1] != storage["abuse_log_id"] else storage["abuse_log_id"]
|
||||
storage["rcid"] = last_check[0] if last_check[0] else storage["rcid"]
|
||||
storage["abuse_log_id"] = last_check[1] if last_check[1] else storage["abuse_log_id"]
|
||||
storage.save_datafile()
|
||||
else:
|
||||
self.memory_id = last_check
|
||||
|
|
Loading…
Reference in a new issue