Skip to content

Commit 0a71cd1

Browse files
fix broken script
1 parent d06cdbc commit 0a71cd1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

choose_l10n_ci_set.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def valid_l10n_mappings():
2121
Returns:
2222
The dictionary of valid l10n mappings.
2323
"""
24-
mapping = defaultdict(set)
24+
mapping = defaultdict(list)
2525
region_paths = [d for d in os.listdir("./l10n_CM/region/")]
2626
for region_path in region_paths:
2727
if region_path != "Unified.json":
@@ -30,7 +30,7 @@ def valid_l10n_mappings():
3030
region_file = json.load(f)
3131
if region_file.get("sites"):
3232
for site in region_file.get("sites"):
33-
mapping[site].add(region)
33+
mapping[site].append(region)
3434
return mapping
3535

3636

@@ -52,14 +52,14 @@ def process_changed_file(f, selected_mappings):
5252
region_path = os.path.join("l10n_CM", "region", f"{region}.json")
5353
# make sure the region mapping file exists before adding the mapping
5454
if os.path.exists(region_path):
55-
selected_mappings[site].add(region)
55+
selected_mappings[site].append(region)
5656
elif f.startswith(os.path.join("l10n_CM", "region")):
5757
# if a region file is changed, add the region to each site mapping.
5858
region = split[-1].split(".")[0]
5959
with open(f, "r+") as f:
6060
region_file = json.load(f)
6161
for site in region_file.get("sites", []):
62-
selected_mappings[site].add(region)
62+
selected_mappings[site].append(region)
6363

6464

6565
def save_mappings(selected_container):
@@ -169,7 +169,7 @@ def select_l10n_mappings(beta_version):
169169
)
170170
main_conftest = "conftest.py"
171171
base_page = os.path.join("modules", "page_base.py")
172-
selected_mappings = defaultdict(set)
172+
selected_mappings = defaultdict(list)
173173
if main_conftest in committed_files or base_page in committed_files:
174174
# Run sample tests for all mappings if main conftest or basepage changed
175175
selected_mappings |= sample_mappings

0 commit comments

Comments
 (0)