Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly cast to str a few cube and cubes instances in _io.py #2526

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
5 changes: 3 additions & 2 deletions esmvalcore/preprocessor/_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,18 +457,19 @@ def save(
logger.debug(
"Not saving cubes %s to %s to avoid data loss. "
"The cube is probably unchanged.",
cubes,
str(cubes),
filename,
)
return filename

for cube in cubes:
logger.debug(
"Saving cube:\n%s\nwith %s data to %s",
cube,
str(cube),
"lazy" if cube.has_lazy_data() else "realized",
filename,
)

if optimize_access:
cube = cubes[0]
if optimize_access == "map":
Expand Down