Commit 33908a00 authored by Zen Fu's avatar Zen Fu
Browse files

[weblate] Make config file a command line argument (tails#17377)

parent e48a4caf
......@@ -312,6 +312,11 @@ def parse_arguments():
help="Path to Weblate repository.",
required=True)
parser.add_argument(
"--config-file",
help="Path to configuration file.",
default=str(pathlib.Path(__file__).with_name("override.yaml")))
args = parser.parse_args()
return args
......@@ -327,7 +332,7 @@ def main():
b = repo.commit("weblate-{}".format(args.weblate_version)).tree/"requirements.txt"
b.stream_data(output)
config = yaml.safe_load(pathlib.Path(__file__).with_name("override.yaml").open())
config = yaml.safe_load(pathlib.Path(args.config_file).open())
SKIP_LIST = set(config.get('skip'))
PIP_ONLY = set(config.get('require_pip'))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment