Skip to content

Commit 6f8e01f

Browse files
fix errors
1 parent e54de2b commit 6f8e01f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

choose_l10n_ci_set.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
22
import logging
33
import os
4-
import random
54
import re
65
import subprocess
76
import sys
@@ -44,7 +43,7 @@ def distribute_mappings_evenly(mappings, version):
4443
version (int): The beta_version of the beta.
4544
"""
4645
if not mappings:
47-
return
46+
return {}
4847
# sort the mappings by the length of the regions per site
4948
mappings = dict(sorted(mappings.items(), key=lambda val: len(val[1]), reverse=True))
5049
# place the mappings into 3 containers evenly according to the load
@@ -94,7 +93,8 @@ def save_mappings(selected_container):
9493
Args:
9594
selected_container: the selected mappings container.
9695
"""
97-
96+
if not selected_container:
97+
return
9898
current_running_mappings = [
9999
f"{key} {' '.join(value)}\n" for key, value in selected_container.items()
100100
]

l10n_CM/run_l10n.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"peacocks",
4646
"whittard",
4747
"diy",
48-
"assos"
48+
"assos",
4949
}
5050

5151
loaded_valid_sites = valid_l10n_mappings().keys()

0 commit comments

Comments
 (0)