updated: close lock file on exit (#31285)

* with open

* those too

* just 1 file

* move this to another pr
pull/31328/head
Justin Newberry 2 years ago committed by GitHub
parent f0b591e345
commit fd07fc3ba4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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