mirror of
https://github.com/munki/munki.git
synced 2026-01-05 14:10:00 -06:00
Fixed edge case in getVersionString() where package's Info.plist contains empty CFBundleShortVersionString or empty CFBundleVersion.
git-svn-id: http://munki.googlecode.com/svn/trunk@435 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -598,7 +598,7 @@ def getVersionString(pl):
|
||||
# else if there's a CFBundleVersion, returns that
|
||||
# else returns an empty string.
|
||||
CFBundleShortVersionString = ''
|
||||
if 'CFBundleShortVersionString' in pl:
|
||||
if pl.get('CFBundleShortVersionString'):
|
||||
CFBundleShortVersionString = \
|
||||
pl['CFBundleShortVersionString'].split()[0]
|
||||
if "Bundle versions string, short" in pl:
|
||||
@@ -612,7 +612,7 @@ def getVersionString(pl):
|
||||
CFBundleShortVersionString = \
|
||||
CFBundleShortVersionString.replace(',','.')
|
||||
return CFBundleShortVersionString
|
||||
if 'CFBundleVersion' in pl:
|
||||
if pl.get('CFBundleVersion'):
|
||||
# no CFBundleShortVersionString, or bad one
|
||||
CFBundleVersion = str(pl['CFBundleVersion']).split()[0]
|
||||
if CFBundleVersion[0] in "0123456789":
|
||||
|
||||
Reference in New Issue
Block a user