Bug 1525327 - Don't crash wptrunner if mozversion fails, r=ato

On Android we aren't necessarily passing in the package path, so
mozversion can't extract the relevant metadata, and on other platforms
it could also fail if we pass in a script file or similar. In that
case we shouldn't fail.

Differential Revision: https://phabricator.services.mozilla.com/D18712
This commit is contained in:
James Graham 2019-02-01 17:32:05 +00:00
Родитель 527413fc1d
Коммит af16c5ce0d
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -163,7 +163,10 @@ def run_info_extras(**kwargs):
def run_info_browser_version(binary):
version_info = mozversion.get_version(binary)
try:
version_info = mozversion.get_version(binary)
except mozversion.errors.VersionError:
version_info = None
if version_info:
return {"browser_build_id": version_info.get("application_buildid", None),
"browser_changeset": version_info.get("application_changeset", None)}