From 8cf99ce5fc6423b1105b80f67a62045522c7aab1 Mon Sep 17 00:00:00 2001 From: Jo Basevi Date: Fri, 23 Aug 2024 10:45:31 +1000 Subject: [PATCH] Change error type and message for UM um_env.py --- payu/models/um.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/payu/models/um.py b/payu/models/um.py index 2642fef4..47bf6470 100644 --- a/payu/models/um.py +++ b/payu/models/um.py @@ -12,8 +12,6 @@ import datetime import fileinput import glob -from importlib.machinery import SourceFileLoader -from importlib.util import spec_from_loader, module_from_spec import os import shutil import string @@ -116,10 +114,10 @@ def setup(self): deprecated_um_env = os.path.join(self.control_path, 'um_env.py') new_um_env = os.path.join(self.control_path, 'um_env.yaml') if (not os.path.isfile(new_um_env)) and os.path.isfile(deprecated_um_env): - raise FutureWarning( + raise RuntimeError( ( - "The `um_env.py` configuration file has been deprecated and " - "should be relplaced with a yaml file. " + "The `um_env.py` configuration file is no longer " + "supported and should be replaced with a yaml file. " "Convert `um_env.py` to `um_env.yaml` using " "https://github.com/ACCESS-NRI/esm1.5-scripts/blob/main/config-files/UM/um_env_to_yaml.py" )