mirror of
https://github.com/munki/munki.git
synced 2026-05-01 09:49:31 -05:00
Don't crash when parsing an item name that endds with a hyphen
This commit is contained in:
@@ -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, '')
|
||||
|
||||
Reference in New Issue
Block a user