comparison pytouhou/ui/music.pyx @ 616:4ce3ef053a25

Remove every case where an exception could be silently eaten by a cdef function.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 28 Mar 2015 23:21:15 +0100
parents c84227022765
children d18c0bf11138
comparison
equal deleted inserted replaced
615:d1f0bb0b7a17 616:4ce3ef053a25
74 self.channels = {} 74 self.channels = {}
75 self.sounds = {} 75 self.sounds = {}
76 self.volume = volume 76 self.volume = volume
77 self.next_channel = 0 77 self.next_channel = 0
78 78
79 cdef int get_channel(self, name): 79 cdef int get_channel(self, name) except -1:
80 if name not in self.channels: 80 if name not in self.channels:
81 self.channels[name] = self.next_channel 81 self.channels[name] = self.next_channel
82 self.next_channel += 1 82 self.next_channel += 1
83 return self.channels[name] 83 return self.channels[name]
84 84