From ee6ce2ce7f1fb4d445eb18990e1180f5d2dcaa1e Mon Sep 17 00:00:00 2001 From: Marek Blaha Date: Mon, 22 Jul 2019 15:05:27 +0200 Subject: [PATCH] [reposync] Filter out rsync schema from printed urls Do not print rsync:// urls when reposync is run with --urls switch. --- plugins/reposync.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/reposync.py b/plugins/reposync.py index 622987e1..3f49911d 100644 --- a/plugins/reposync.py +++ b/plugins/reposync.py @@ -203,5 +203,9 @@ def download_packages(self, repo, pkglist): def print_urls(self, pkglist): for pkg in pkglist: - url = pkg.remote_location(schemes=None) - print(url) + url = pkg.remote_location(schemes=['file', 'http', 'https', 'ftp']) + if url: + print(url) + else: + msg = _("Failed to get mirror for package: %s") % pkg.name + logger.warning(msg)