Skip to content

Commit

Permalink
[reposync] Filter out rsync schema from printed urls
Browse files Browse the repository at this point in the history
Do not print rsync:// urls when reposync is run with --urls switch.
  • Loading branch information
m-blaha committed Jul 23, 2019
1 parent b51c313 commit ee6ce2c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/reposync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit ee6ce2c

Please sign in to comment.