File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 33import json
44import logging
55import os
6- import shutil
76import subprocess
87import time
98from enum import Enum
@@ -167,11 +166,11 @@ async def do_eeprom_update(i_know_what_i_am_doing: bool = False) -> Any:
167166async def reset_settings (i_know_what_i_am_doing : bool = False ) -> Any :
168167 check_what_i_am_doing (i_know_what_i_am_doing )
169168 # Be sure to not delete bootstrap to avoid going back to factory image
170- bootstrap_config_path = "/root/.config/bootstrap/startup.json"
171- temporary_location = "/tmp/bootstrap_startup.json"
172- shutil . copy2 ( bootstrap_config_path , temporary_location )
173- delete_everything ( Path ( appdirs . user_config_dir ()))
174- shutil . copy2 ( temporary_location , bootstrap_config_path )
169+ ignore = [
170+ Path ( "/root/.config/ardupilot-manager" ),
171+ Path ( "/root/.config/bootstrap" ),
172+ ]
173+ delete_everything ( Path ( appdirs . user_config_dir ()), ignore = ignore )
175174
176175
177176@app .post ("/services/remove_log" , status_code = status .HTTP_200_OK )
You can’t perform that action at this time.
0 commit comments