We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4121dee commit 1d8ebf9Copy full SHA for 1d8ebf9
vmupdate/agent/source/apt/apt_cli.py
@@ -42,8 +42,8 @@ def wait_for_lock(self):
42
"""
43
Wait for any other apt-get instance to finish.
44
45
- with open("/var/lib/apt/lists/lock") as f_lock:
46
- fcntl.flock(f_lock.fileno(), fcntl.LOCK_EX)
+ with open("/var/lib/apt/lists/lock", "rb+") as f_lock:
+ fcntl.lockf(f_lock.fileno(), fcntl.LOCK_EX)
47
48
def refresh(self, hard_fail: bool) -> ProcessResult:
49
0 commit comments