'Handle mirroring of directories using wget'

def wget_sync(self, repo):

    repo_mirror = repo.mirror.strip()
    if ((repo.rpm_list != '') and (repo.rpm_list != [])):
        self.logger.warning("--rpm-list    is    not    supported    for    wget'd    repositories")
    dest_path = os.path.join((self.settings.webdir + '/repo_mirror'), repo.name)
    cmd = ('wget    -N    -np    -r    -l    inf    -nd    -P    %s    %s' % (dest_path, repo_mirror))
    rc = utils.subprocess_call(self.logger, cmd)
    if (rc != 0):
        utils.die(self.logger, 'cobbler    reposync    failed')
    os.path.walk(dest_path, self.createrepo_walker, repo)
    self.create_local_file(dest_path, repo)
