def check_lockfile(path):
    """ Return (user, modification time) of lockfile, or (None, None). """
    path = os.path.join(path, LOCKFILE)
    if os.path.exists(path):
        try:
            info = os.stat(path)
        except __HOLE__, 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)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/scripts/repo.py/check_lockfile