--- lockfile-0.8/lockfile.py 2009-03-30 12:44:14.000000000 +0200 +++ lockfile/lockfile.py 2012-10-14 14:13:27.000000000 +0200 @@ -259,11 +263,11 @@ os.unlink(self.unique_name) if timeout > 0: raise LockTimeout else: raise AlreadyLocked - time.sleep(timeout is not None and timeout/10 or 0.1) + time.sleep(timeout/10. if timeout > 0 else 0.1) else: # Link creation succeeded. We're good to go. return def release(self):