From 5e8e21b66b3923eda091936e00c1c8d9f75cd12e Mon Sep 17 00:00:00 2001 From: linarphy Date: Mon, 19 Jun 2023 13:32:31 +0200 Subject: [PATCH] Fix typo in cache loading --- spectrum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spectrum.py b/spectrum.py index 612d2d1..3b57daa 100644 --- a/spectrum.py +++ b/spectrum.py @@ -116,7 +116,7 @@ cache_file = pathlib.Path( cache ) if cache_file.is_file() and not no_cache: if verbose: print( 'using cache' ) - with shelve.optn( str( cache_file ) ) as cache: + with shelve.open( str( cache_file ) ) as cache: for key in [ 'data' , 'border' , 'calibrations' ]: if key not in cache: raise Exception( 'spectrum.py: missing data in cache file' )