lpapicache: use urlparse instead of manual parsing

This commit is contained in:
Dan Streetman 2020-01-26 18:56:43 -05:00
parent d98e16226b
commit ee98423715

View File

@ -824,7 +824,7 @@ class SourcePackagePublishingHistory(BaseWrapper):
urls = self.binaryFileUrls()
for url in urls:
# strip out the URL leading text.
filename = url.rsplit('/', 1)[1]
filename = os.path.basename(urlparse(url).path)
# strip the file suffix
(pkgname, _, e) = filename.rpartition('.')
# split into name, version, arch