Clean a directory if exists and not in dry run

def _clean_directory(self, name):
        """Clean a directory if exists and not in dry run"""
        if not os.path.exists(name):
            return
        self.announce(
            "removing directory '{}' and all its contents".format(name)
        )
        if not self.dry_run:
            rmtree(name, True)