Skip to content

Commit 2f6b95b

Browse files
Refactor print for pre-3.12 versions of python (#238)
1 parent 3e2998b commit 2f6b95b

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

lfric_macros/apply_macros.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python
22
##############################################################################
33
# (c) Crown copyright 2024 Met Office. All rights reserved.
44
# The file LICENCE, distributed with this code, contains details of the terms
@@ -1036,14 +1036,10 @@ def preprocess_macros(self, nproc: int) -> None:
10361036
if exception is not None:
10371037
executor.shutdown(wait=False, cancel_futures=True)
10381038
raise exception
1039-
print(
1040-
"[INFO] Processed macro successfully written to "
1041-
f"{
1042-
self.parse_application_section(
1043-
meta_order[write_tasks.index(task)]
1044-
)
1045-
}"
1039+
print_val = self.parse_application_section(
1040+
meta_order[write_tasks.index(task)]
10461041
)
1042+
print(f"[INFO] Processed macro successfully written to {print_val}")
10471043

10481044
############################################################################
10491045
# Upgrade Apps Functions

0 commit comments

Comments
 (0)