зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1380297 - Mac nightly repackage fails trying to read CodeName r=mshal
MozReview-Commit-ID: LauJRihWxJ0 --HG-- extra : rebase_source : 049bac5545891052fcfb20a05b589cdcba828f18 extra : source : 18d843860f83a219e8fbc70b7e6295857d1d70f0
This commit is contained in:
Родитель
41ec10ec9c
Коммит
50b3d12911
|
@ -6,13 +6,21 @@ import os
|
|||
import ConfigParser
|
||||
import mozpack.path as mozpath
|
||||
|
||||
def get_application_ini_value(application_directory, section, value):
|
||||
|
||||
def get_application_ini_value(application_directory, section, value,
|
||||
fallback=None):
|
||||
rc = None
|
||||
for root, dirs, files in os.walk(application_directory):
|
||||
if 'application.ini' in files:
|
||||
parser = ConfigParser.ConfigParser()
|
||||
parser.read(mozpath.join(root, 'application.ini'))
|
||||
rc = parser.get(section, value)
|
||||
try:
|
||||
rc = parser.get(section, value)
|
||||
except ConfigParser.NoOptionError:
|
||||
if not fallback:
|
||||
raise
|
||||
else:
|
||||
rc = parser.get(section, fallback)
|
||||
break
|
||||
|
||||
if rc is None:
|
||||
|
|
|
@ -28,7 +28,8 @@ def repackage_dmg(infile, output):
|
|||
if e.errno != errno.ENOENT:
|
||||
raise
|
||||
|
||||
volume_name = get_application_ini_value(tmpdir, 'App', 'CodeName')
|
||||
volume_name = get_application_ini_value(tmpdir, 'App', 'CodeName',
|
||||
fallback='Name')
|
||||
|
||||
# The extra_files argument is empty [] because they are already a part
|
||||
# of the original dmg produced by the build, and they remain in the
|
||||
|
|
Загрузка…
Ссылка в новой задаче