#NEWLINE# def getAdobePackageInfo( installroot ) : #NEWLINE# #INDENT# 'Gets the package name from the AdobeUberInstaller.xml file;\n    other info from the payloads folder' #NEWLINE# info = getAdobeSetupInfo ( installroot ) #NEWLINE# info [ 'description' ] = '' #NEWLINE# installerxml = os . path . join ( installroot , 'AdobeUberInstaller.xml' ) #NEWLINE# if os . path . exists ( installerxml ) : #NEWLINE# #INDENT# description = '' #NEWLINE# dom = minidom . parse ( installerxml ) #NEWLINE# installinfo = dom . getElementsByTagName ( 'InstallInfo' ) #NEWLINE# if installinfo : #NEWLINE# #INDENT# packagedescriptions = installinfo [ 0 ] . getElementsByTagName ( 'PackageDescription' ) #NEWLINE# if packagedescriptions : #NEWLINE# #INDENT# prop = packagedescriptions [ 0 ] #NEWLINE# for node in prop . childNodes : #NEWLINE# #INDENT# description += node . nodeValue #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if description : #NEWLINE# #INDENT# description_parts = description . split ( ' : ' , 1 ) #NEWLINE# info [ 'display_name' ] = description_parts [ 0 ] #NEWLINE# if ( len ( description_parts ) > 1 ) : #NEWLINE# #INDENT# info [ 'description' ] = description_parts [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# info [ 'description' ] = '' #NEWLINE# #UNINDENT# return info #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# installerxml = os . path . join ( installroot , 'optionXML.xml' ) #NEWLINE# if os . path . exists ( installerxml ) : #NEWLINE# #INDENT# dom = minidom . parse ( installerxml ) #NEWLINE# installinfo = dom . getElementsByTagName ( 'InstallInfo' ) #NEWLINE# if installinfo : #NEWLINE# #INDENT# pkgname_elems = installinfo [ 0 ] . getElementsByTagName ( 'PackageName' ) #NEWLINE# if pkgname_elems : #NEWLINE# #INDENT# prop = pkgname_elems [ 0 ] #NEWLINE# pkgname = '' #NEWLINE# for node in prop . childNodes : #NEWLINE# #INDENT# pkgname += node . nodeValue #NEWLINE# #UNINDENT# info [ 'display_name' ] = pkgname #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( not info . get ( 'display_name' ) ) : #NEWLINE# #INDENT# info [ 'display_name' ] = os . path . basename ( installroot ) #NEWLINE# #UNINDENT# return info