Mercurial > touhou
diff pytouhou/ui/music.pyx @ 764:d18c0bf11138
Python: Use logger.warning() as logger.warn() is deprecated
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 26 Aug 2022 18:55:39 +0200 |
parents | 4ce3ef053a25 |
children |
line wrap: on
line diff
--- a/pytouhou/ui/music.pyx +++ b/pytouhou/ui/music.pyx @@ -37,7 +37,7 @@ cdef class BGMPlayer(MusicPlayer): track = resource_loader.get_track(posname) except KeyError: track = None - logger.warn('Music description “%s” not found, continuing without looping data.', posname) + logger.warning('Music description “%s” not found, continuing without looping data.', posname) globname = join(resource_loader.game_dir, bgm[1]).replace('.mid', '.*') filenames = glob(globname) for filename in reversed(filenames): @@ -54,7 +54,7 @@ cdef class BGMPlayer(MusicPlayer): break else: self.bgms.append(None) - logger.warn('No working music file for “%s”, disabling bgm.', globname) + logger.warning('No working music file for “%s”, disabling bgm.', globname) cpdef play(self, index): cdef Music bgm @@ -89,7 +89,7 @@ cdef class SFXPlayer(MusicPlayer): wave_file = self.loader.get_file(name) chunk = load_chunk(wave_file) except (KeyError, sdl.SDLError) as error: - logger.warn('Sound “%s” not found: %s', name, error) + logger.warning('Sound “%s” not found: %s', name, error) chunk = None else: chunk.set_volume(self.volume)