From fa3c91db7a91e03744cd0ca51b6cb8bab2e68e21 Mon Sep 17 00:00:00 2001 From: ZoeLeibowitz Date: Thu, 18 Jul 2024 12:45:43 +0100 Subject: [PATCH] Remove ValueError --- devito/petsc/utils.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/devito/petsc/utils.py b/devito/petsc/utils.py index 685d7b7d58..7f300afcd5 100644 --- a/devito/petsc/utils.py +++ b/devito/petsc/utils.py @@ -24,10 +24,7 @@ def get_petsc_dir(): petsc_dir = os.environ.get(i) if petsc_dir: return petsc_dir - raise ValueError( - 'Environment variable PETSC_DIR is not set. ' - 'Set it to the PETSc directory.' - ) + return None @memoized_func @@ -37,10 +34,7 @@ def get_petsc_arch(): petsc_arch = os.environ.get(i) if petsc_arch: return petsc_arch - raise ValueError( - 'Environment variable PETSC_ARCH is not set. ' - 'Set it to the configuration of PETSc you wish to use.' - ) + return None def core_metadata():