(self)
Remove cache directory, if it exists
Remove cache directory, if it exists
Remove cache directory if it exists
def clear_cache(self) -> None:
        """Remove cache directory, if it exists"""
        if self.cache_dir is not None and os.path.isdir(self.cache_dir):
            log.info("Removing cache dir: %s", self.cache_dir)
            try:
                shutil.rmtree(self.cache_dir)
            except OSError as e:
                log.error("Failed: %s", str(e))
def clear_cache ( self ) -> None : if self . cache_dir is not None and os . path . isdir ( self . cache_dir ) : log . info ( "Removing cache dir: %s" , self . cache_dir ) try : shutil . rmtree ( self . cache_dir ) except OSError as e : log . error ( "Failed: %s" , str ( e ) )