updated: close lock file on exit (#31285)

* with open

* those too

* just 1 file

* move this to another pr
old-commit-hash: fd07fc3ba4
pull/32199/head
Justin Newberry 1 year ago committed by GitHub
parent 9205780c13
commit a6ed630fb5
  1. 2
      selfdrive/updated.py

@ -413,7 +413,7 @@ def main() -> None:
cloudlog.warning("updates are disabled by the DisableUpdates param")
exit(0)
ov_lock_fd = open(LOCK_FILE, 'w')
with open(LOCK_FILE, 'w') as ov_lock_fd:
try:
fcntl.flock(ov_lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
except OSError as e:

Loading…
Cancel
Save