mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-11-29 03:16:40 -05:00
Atomic writes for config fields, don't overwrite intro_time, Node editor allow fixes
This commit is contained in:
parent
0d3b519a07
commit
5d0ffce51c
5 changed files with 143 additions and 46 deletions
|
|
@ -3,6 +3,7 @@ import threading
|
|||
|
||||
import RNS
|
||||
import RNS.vendor.umsgpack as msgpack
|
||||
from nomadnet.util import write_config_atomic
|
||||
|
||||
|
||||
class InterfaceProfiles:
|
||||
|
|
@ -178,7 +179,7 @@ class InterfaceProfiles:
|
|||
interfaces[name]["interface_enabled"] = value
|
||||
if "enabled" in interfaces[name]:
|
||||
interfaces[name]["enabled"] = value
|
||||
self.app.rns.config.write()
|
||||
write_config_atomic(self.app.rns.config)
|
||||
return True
|
||||
except Exception as e:
|
||||
RNS.log("Could not apply interface profile: "+str(e), RNS.LOG_ERROR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue