From 5cbdfdbe8212b4ebaa0a07b2a5a926004a9a9b3c Mon Sep 17 00:00:00 2001 From: "Brett T. Warden" Date: Fri, 19 Apr 2019 10:52:05 -0700 Subject: [PATCH] Catch github url special case When using github urls, the code tries to test the detected name against the previously provided name. If we didn't provide a name, though, this would throw an exception. --- autospec/tarball.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autospec/tarball.py b/autospec/tarball.py index fbda2c77..2a0c98e5 100644 --- a/autospec/tarball.py +++ b/autospec/tarball.py @@ -380,7 +380,7 @@ def name_and_version(name_arg, version_arg, filemanager): m = re.search(pattern, url) if m: repo = m.group(2).strip() - if repo not in name: + if not name or repo not in name: # Only take the repo name as the package name if it's more descriptive name = repo elif name != repo: