Use startswith for url comparison in project

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2018-04-17 12:28:59 -04:00
parent 31a4a75c98
commit 88db0fe4ed
+1 -1
View File
@@ -654,7 +654,7 @@ class Project(object):
if name:
source = [s for s in sources if s.get('name') == name]
elif url:
source = [s for s in sources if s.get('url') in url]
source = [s for s in sources if url.startswith(s.get('url'))]
if source:
return first(source)