def check_lockfile(path):
    path = os.path.join(path, LOCKFILE)
    if os.path.exists(path):
        try:
            info = os.stat(path)
        except OSError, exc:
            print 'Cannot access lockfile:', exc
            sys.exit(1)
        else:
            user = get_username(info.st_uid)
            mtime = time.asctime(time.localtime(info.st_mtime))
            return (user, mtime)
    else:
        return (None, None)
Return (user, modification time) of lockfile, or (None, None).
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/scripts/repo.py/check_lockfile