Fix typo in cache loading

This commit is contained in:
linarphy 2023-06-19 13:32:31 +02:00
parent df29d0378b
commit 5e8e21b66b
No known key found for this signature in database
GPG key ID: 3D4AAAC3AD16E79C

View file

@ -116,7 +116,7 @@ cache_file = pathlib.Path( cache )
if cache_file.is_file() and not no_cache: if cache_file.is_file() and not no_cache:
if verbose: if verbose:
print( 'using cache' ) 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' ]: for key in [ 'data' , 'border' , 'calibrations' ]:
if key not in cache: if key not in cache:
raise Exception( 'spectrum.py: missing data in cache file' ) raise Exception( 'spectrum.py: missing data in cache file' )