mirror of
https://github.com/munki/munki.git
synced 2026-04-22 12:38:23 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user