mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 992139 - [mozversion] Enhance mozversion to return application_display_name. r=hskupin
This commit is contained in:
parent
b35e578978
commit
417486e5ea
@ -43,7 +43,7 @@ class Version(mozlog.LoggingMixin):
|
||||
config_file = os.path.join(config_path, '%s.ini' % filename)
|
||||
if os.path.exists(config_file):
|
||||
config.read(config_file)
|
||||
name_map = {'CodeName': 'code_name',
|
||||
name_map = {'CodeName': 'display_name',
|
||||
'SourceRepository': 'repository',
|
||||
'SourceStamp': 'changeset'}
|
||||
for key in ('BuildID', 'Name', 'CodeName', 'Version',
|
||||
@ -51,6 +51,10 @@ class Version(mozlog.LoggingMixin):
|
||||
name = name_map.get(key, key).lower()
|
||||
self._info['%s_%s' % (filename, name)] = config.has_option(
|
||||
section, key) and config.get(section, key) or None
|
||||
|
||||
if not self._info.get('application_display_name'):
|
||||
self._info['application_display_name'] = \
|
||||
self._info.get('application_name')
|
||||
else:
|
||||
self.warn('Unable to find %s' % config_file)
|
||||
|
||||
|
@ -69,7 +69,7 @@ SourceRepository = PlatformSourceRepo
|
||||
|
||||
def _check_version(self, version):
|
||||
self.assertEqual(version.get('application_name'), 'AppName')
|
||||
self.assertEqual(version.get('application_code_name'), 'AppCodeName')
|
||||
self.assertEqual(version.get('application_display_name'), 'AppCodeName')
|
||||
self.assertEqual(version.get('application_version'), 'AppVersion')
|
||||
self.assertEqual(version.get('application_buildid'), 'AppBuildID')
|
||||
self.assertEqual(
|
||||
|
Loading…
Reference in New Issue
Block a user