From ee984237158add551c0e2097e43e86afcd06d86b Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Sun, 26 Jan 2020 18:56:43 -0500 Subject: [PATCH] lpapicache: use urlparse instead of manual parsing --- ubuntutools/lp/lpapicache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntutools/lp/lpapicache.py b/ubuntutools/lp/lpapicache.py index ae0f13e..28030e7 100644 --- a/ubuntutools/lp/lpapicache.py +++ b/ubuntutools/lp/lpapicache.py @@ -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