X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git;a=blobdiff_plain;f=helpers%2Fmixer.py;h=9242b61af9100e944b5060220bf40c0567741443;hp=1d3f28fe21fb33e4986d829d154df822b81a6206;hb=205861936ca55357beea6a8af7c0c9ed5a61f484;hpb=9c4f705fc6e8ef19973c1977ae8a5b9982cf6ecc 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()