mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
aa1e2c4f05
MozReview-Commit-ID: 9xy3UPoRCmW --HG-- extra : rebase_source : 235819c4f3e363ddd1deffec11d3cae6fe6c56d5
22 lines
593 B
Python
22 lines
593 B
Python
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
import sys
|
|
import json
|
|
|
|
engines = []
|
|
|
|
locale = sys.argv[2]
|
|
|
|
with open(sys.argv[1]) as f:
|
|
searchinfo = json.load(f)
|
|
|
|
if locale in searchinfo["locales"]:
|
|
for region in searchinfo["locales"][locale]:
|
|
engines = list(set(engines)|set(searchinfo["locales"][locale][region]["visibleDefaultEngines"]))
|
|
else:
|
|
engines = searchinfo["default"]["visibleDefaultEngines"]
|
|
|
|
print '\n'.join(engines)
|