Skip to content

Commit 185201b

Browse files
author
Alan Christie
committed
fix: load-er now adds '.yaml'
save-cr.py no longer prints the token
1 parent 4a3ed9c commit 185201b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tools/load-er.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ def main(c_args: argparse.Namespace) -> None:
3333
password=env.admin_password,
3434
)
3535

36+
filename: str = c_args.file
37+
if not filename.endswith('.yaml'):
38+
filename += '.yaml'
39+
3640
# Just read the list from the chosen file
37-
file_content: str = Path(c_args.file).read_text(encoding='utf8')
41+
file_content: str = Path(filename).read_text(encoding='utf8')
3842
rates: List[Dict[str, Any]] = yaml.load(file_content, Loader=yaml.FullLoader)
3943
er_rv: DmApiRv = DmApi.set_job_exchange_rates(token, rates=rates)
4044
if not er_rv.success:

tools/save-er.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def main(c_args: argparse.Namespace) -> None:
3232
username=env.admin_user,
3333
password=env.admin_password,
3434
)
35-
console.log(token)
3635

3736
er_rv: DmApiRv = DmApi.get_job_exchange_rates(token)
3837
if not er_rv.success:

0 commit comments

Comments
 (0)