diff --git a/src/preprocessor.py b/src/preprocessor.py index c56a70adc..c174d865d 100644 --- a/src/preprocessor.py +++ b/src/preprocessor.py @@ -66,7 +66,6 @@ class PreprocessorFunctionBase(abc.ABC): function is capable of converting into the format requested by the POD. - :meth:`process`, which actually implements the data format conversion. """ - def __init__(self, *args): """Called during Preprocessor's init.""" pass @@ -1557,11 +1556,12 @@ def __init__(self, # initialize PreprocessorFunctionBase objects super().__init__(model_paths, config) self.file_preproc_functions = [f for f in self._functions] - if any([s for s in config.user_pp_scripts]): - self.add_user_pp_scripts(config) - self.module_root = os.path.join(config.CODE_ROOT, "user_scripts") - else: - self.user_pp_scripts = None + if hasattr(config, 'user_pp_scripts'): + if any([s for s in config.user_pp_scripts]): + self.add_user_pp_scripts(config) + self.module_root = os.path.join(config.CODE_ROOT, "user_scripts") + else: + self.user_pp_scripts = None def add_user_pp_scripts(self, runtime_config: util.NameSpace): self.user_pp_scripts = [s for s in runtime_config.user_pp_scripts]