(self, base)
Initialise an instance.

        :param base: The base directory where the cache should be located.
Initialise an instance.
Initialise an instance .
def __init__(self, base):
        """
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        """
        # we use 'isdir' instead of 'exists', because we want to
        # fail if there's a file with that name
        if not os.path.isdir(base):  # pragma: no cover
            os.makedirs(base)
        if (os.stat(base).st_mode & 0o77) != 0:
            logger.warning('Directory \'%s\' is not private', base)
        self.base = os.path.abspath(os.path.normpath(base))
def __init__ ( self , base ) : # we use 'isdir' instead of 'exists', because we want to # fail if there's a file with that name if not os . path . isdir ( base ) : # pragma: no cover os . makedirs ( base ) if ( os . stat ( base ) . st_mode & 0o77 ) != 0 : logger . warning ( 'Directory \'%s\' is not private' , base ) self . base = os . path . abspath ( os . path . normpath ( base ) )