Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/t/u/tuskar-0.4.1/tuskar/openstack/common/lockutils.py   tuskar(Download)
 
from tuskar.openstack.common import fileutils
from tuskar.openstack.common.gettextutils import _, _LE, _LI
from tuskar.openstack.common import log as logging
 
        if not os.path.exists(basedir):
            fileutils.ensure_tree(basedir)
            LOG.info(_LI('Created lock path: %s'), basedir)
 
        self.lockfile = open(self.fname, 'w')
            os.remove(lock_file_path)
        except OSError:
            LOG.info(_LI('Failed to remove file %(file)s'),
                     {'file': lock_file_path})