Skip to content

Commit

Permalink
revising the supervisor for the nested download
Browse files Browse the repository at this point in the history
  • Loading branch information
xianglic committed Oct 22, 2024
1 parent a174e91 commit b236fc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions onboard/python/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,14 @@ def download(self, url: str):
os.makedirs(self.drone_id, exist_ok=True)
z = ZipFile(filename)
sys.path.append(self.drone_id)
os.chdir(self.drone_id)
try:
subprocess.check_call(['rm', '-rf', './task_defs', './mission', './transition_defs'])
except subprocess.CalledProcessError as e:
logger.debug(f"Error removing old task/transition defs: {e}")
z.extractall()
self.install_prereqs()
os.chdir('..')
except Exception as e:
print(e)

Expand Down

0 comments on commit b236fc4

Please sign in to comment.