Jason R. Coombs  committed a308d0d Draft


  • Participants
  • Parent commits b7a47f3
  • Branches default

Comments (0)

Files changed (1)

File eggmonster/

 import os
 import time
-import errno
 import functools
 import zc.lockfile
 class FileLock(object):
     A cross-platform locking file context.
     May be used in a with statement to provide system-level concurrency
     This class relies on zc.lockfile for the underlying locking.
     This class is not threadsafe.
         Attempt to acquire the lock every `delay` seconds until the
         lock is acquired or until `timeout` has expired.
         Raises FileLockTimeout if the timeout is exceeded.
         Errors opening the lock file (other than if it exists) are
         passed through.
                 self.lock = attempt()
-            except zc.lockfile.LockError, e:
+            except zc.lockfile.LockError:
                 timeout_expired = time.time()-start_time >= self.timeout
                 if timeout_expired:
                     raise FileLockTimeout()