Skip to content

Commit

Permalink
aded quick patch disabling fcntl for windows
Browse files Browse the repository at this point in the history
Signed-off-by: Maroun Touma <[email protected]>
  • Loading branch information
touma-I committed Jan 28, 2025
1 parent d56687b commit 8076990
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

import abc
import datetime
import fcntl
if platform.system() != 'Windows':
import fcntl
import os
import tempfile
import threading
Expand Down Expand Up @@ -98,7 +99,8 @@ def acquire(self, block=True, timeout=None):
timeout = max(0, timeout)
while not locked and (timeout is None or waited <= timeout):
try:
fcntl.lockf(self.fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
if platform.system() != 'Windows':
fcntl.lockf(self.fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
locked = True
except Exception as exc:
# Only get here if lock could not be acquired
Expand Down

0 comments on commit 8076990

Please sign in to comment.