X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=helpers%2Fmixer.py;h=9242b61af9100e944b5060220bf40c0567741443;hb=205861936ca55357beea6a8af7c0c9ed5a61f484;hp=1d3f28fe21fb33e4986d829d154df822b81a6206;hpb=2e4049036ec4d90a9daeff606d821d2ac2d023ce;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/helpers/mixer.py b/helpers/mixer.py index 1d3f28f..9242b61 100644 --- a/helpers/mixer.py +++ b/helpers/mixer.py @@ -35,7 +35,8 @@ class Mixer: self.start() def remove_file(self, music_file): - self.open_files.remove(music_file) + if music_file in self.open_files: + self.open_files.remove(music_file) if len(self.open_files) == 0: self.stop()