Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes
utils.LockFile Class Reference

List of all members.

Public Member Functions

def __init__
def __del__

Public Attributes


Detailed Description

LockFile is used by the lockFile method to hold the lock.

This object should not be used directly, but only through
the lockFile method below.

Definition at line 47 of file

Constructor & Destructor Documentation

def utils.LockFile.__init__ (   self,

Definition at line 53 of file

00054   def __init__(self, lockfile):
    self.lockfile = lockfile
def utils.LockFile.__del__ (   self)

Definition at line 55 of file

00056   def __del__(self):
00057     while True:
00058       try:
00059         os.remove(self.lockfile)
00060         break
00061       except OSError, e:
00062         if e.errno == errno.EACCES:
00063           # another process probably has the file open, we'll retry.
00064           # just a short sleep since we want to drop the lock ASAP
00065           # (but we need to let some other process close the file first)
00066           time.sleep(0.1)
00067         else:
00068           # re-raise unknown errors
00069           raise

Member Data Documentation

Definition at line 54 of file

The documentation for this class was generated from the following file: