

def _get(self, path, timeout):
    if (os.path.exists(path) is False):
        return None
    self.lock.acquire()
    try:
        f_lock = self._lock_file(path, False)
        datafile = open(path, 'rb')
        (created_time, value) = pickle.load(datafile)
        datafile.close()
        if (timeout is None):
            timeout = self.timeout
        if (timeout > 0):
            if ((time.time() - created_time) >= timeout):
                value = None
                self._delete_file(path)
        self._unlock_file(f_lock)
        return value
    finally:
        self.lock.release()

dataset/ETHPy150Open tweepy/tweepy/tweepy/cache.py FileCache._get/original