Don't crash when parsing an item name that endds with a hyphen

This commit is contained in:
Greg Neagle
2020-07-02 13:26:44 -07:00
parent 353d542974
commit 09af1c23c6
+1 -1
View File
@@ -147,7 +147,7 @@ def split_name_and_version(some_string):
chunks = some_string.split(delim)
vers = chunks.pop()
name = delim.join(chunks)
if vers[0] in '0123456789':
if vers and vers[0] in '0123456789':
return (name, vers)
return (some_string, '')