just check if file exists rather than trying to open

This commit is contained in:
Jan Petykiewicz 2022-10-04 17:09:14 -07:00
parent ad1ec6acfb
commit 31e6e0ec60

View File

@ -32,12 +32,11 @@ def pyfftw_load_wisdom(path):
except ImportError as e: except ImportError as e:
pass pass
try: if path.exists():
with open(path, 'rb') as f: with open(path, 'rb') as f:
wisdom = pickle.load(f) wisdom = pickle.load(f)
pyfftw.import_wisdom(wisdom) pyfftw.import_wisdom(wisdom)
except FileNotFoundError as e:
pass
logger.info('Drawing grid...') logger.info('Drawing grid...')
dx = 40 dx = 40