Tweaks to better parse out the Software Update title, version and description from a wider variety of valid dist files.

git-svn-id: http://munki.googlecode.com/svn/trunk@1017 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2011-02-01 06:03:49 +00:00
parent 69705bb33e
commit 6e188c8cc7
+4 -1
View File
@@ -360,7 +360,7 @@ def parseDist(filename):
if string_elements:
strings = string_elements[0]
if strings.firstChild:
text = strings.firstChild.nodeValue
text = strings.firstChild.wholeText
# get title, version and description as displayed in Software Update
title = vers = description = ""
@@ -372,6 +372,9 @@ def parseDist(filename):
if line.startswith('"SU_VERS"'):
vers = line[9:]
vers = vers[vers.find('"')+1:-2]
if line.startswith('"SU_VERSION"'):
vers = line[12:]
vers = vers[vers.find('"')+1:-2]
if line.startswith('"SU_DESCRIPTION"'):
description = ""
keep = True