Closed
Bug 1372251
Opened 8 years ago
Closed 8 years ago
[compare-locales] Add command-line argument to overwrite configuration env entries
Categories
(Localization Infrastructure and Tools :: compare-locales, enhancement)
Localization Infrastructure and Tools
compare-locales
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Pike, Assigned: Pike)
References
Details
Attachments
(1 file)
For c-c, we have the path to mozilla-central encoded in the config as an env variable.
To pick up source-tree configs, and to digest this for automation, we need to be able to overwrite this, in particular also via the commandline.
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → l10n
| Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8886536 [details]
bug 1372251, add commandline argument to overwrite variables in toml files,
https://reviewboard.mozilla.org/r/157350/#review162532
::: compare_locales/commands.py:141
(Diff revision 1)
> + for define in args.D:
> + define_tuple = define.split('=', 1)
> + if len(define_tuple) == 1:
> + # no '=' in define, assume empty string
> + define_tuple.append('')
> + config_env[define_tuple[0]] = define_tuple[1]
This can be written more concisely with `partition`, which splits only once and uses empty strings as fallback:
key, _, value = define.partition('=')
config_env[key] = value
Attachment #8886536 -
Flags: review?(stas) → review+
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/l10n/compare-locales/rev/208a84e6adaee84e2f2a80b044409fa5f8924f0b, marking fixed.
Thanks.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•