Skip to content
Snippets Groups Projects
Commit d3a4d424 authored by Jean-Marie Favreau's avatar Jean-Marie Favreau
Browse files

Fix a bug (error in a cache file)

parent b4230ca1
No related branches found
No related tags found
No related merge requests found
...@@ -48,9 +48,12 @@ class MagasinDEchantillons(object): ...@@ -48,9 +48,12 @@ class MagasinDEchantillons(object):
def chargerDepuisCache(self, cleTableau): def chargerDepuisCache(self, cleTableau):
fn = self.nomFichierCache(cleTableau) fn = self.nomFichierCache(cleTableau)
if os.path.isfile(fn): if os.path.isfile(fn):
with open(fn, 'rb') as f: try:
self.echantillon[cleTableau] = pickle.load(f) with open(fn, 'rb') as f:
return self.echantillon[cleTableau] self.echantillon[cleTableau] = pickle.load(f)
return self.echantillon[cleTableau]
except EOFError:
return None
return None return None
# sauve le son déjà calculé pour cette fréquence depuis un fichier # sauve le son déjà calculé pour cette fréquence depuis un fichier
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment