def __getCachedToken(self):
        """Read and return a cached token, or None if not found.

        The token is read from the cached token file, which is basically the
        entire RSP response containing the auth element.
        """

        try:
            f = file(self.__getCachedTokenFilename(), "r")
            
            data = f.read()
            f.close()

            rsp = XMLNode.parseXML(data)

            return rsp.auth[0].token[0].elementText

        except __HOLE__:
            return None

    #-----------------------------------------------------------------------
dataset/ETHPy150Open sightmachine/SimpleCV/SimpleCV/MachineLearning/query_imgs/flickrapi2.py/FlickrAPI.__getCachedToken