summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lockfile/pidlockfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lockfile/pidlockfile.py b/lockfile/pidlockfile.py
index 6d042d7..c4c8a39 100644
--- a/lockfile/pidlockfile.py
+++ b/lockfile/pidlockfile.py
@@ -81,8 +81,8 @@ class PIDLockFile(LockBase):
except OSError as exc:
if exc.errno == errno.EEXIST:
# The lock creation failed. Maybe sleep a bit.
- if timeout is not None and time.time() > end_time:
- if timeout > 0:
+ if time.time() > end_time:
+ if timeout is not None and timeout > 0:
raise LockTimeout("Timeout waiting to acquire"
" lock for %s" %
self.path)