Use temp dir for saving debug.xml for anatric
This commit is contained in:
@ -401,9 +401,11 @@ def create():
|
|||||||
)
|
)
|
||||||
|
|
||||||
async def update_config():
|
async def update_config():
|
||||||
config.save_as("debug.xml")
|
with tempfile.TemporaryDirectory() as temp_dir:
|
||||||
with open("debug.xml") as f_config:
|
temp_file = temp_dir + "/debug.xml"
|
||||||
output_config.value = f_config.read()
|
config.save_as(temp_file)
|
||||||
|
with open(temp_file) as f_config:
|
||||||
|
output_config.value = f_config.read()
|
||||||
|
|
||||||
doc.add_periodic_callback(update_config, 1000)
|
doc.add_periodic_callback(update_config, 1000)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user