Error wrapper, since this is a mess. This way of doing things will be relegated to another class soon.
This commit is contained in:
parent
1610cd15de
commit
8b81900ec5
1 changed files with 8 additions and 5 deletions
|
@ -1672,11 +1672,14 @@ class PesterWindow(MovingWindow):
|
||||||
sounds = [self.alarm, self.memosound, self.namesound, self.ceasesound,
|
sounds = [self.alarm, self.memosound, self.namesound, self.ceasesound,
|
||||||
self.honksound]
|
self.honksound]
|
||||||
for sound in sounds:
|
for sound in sounds:
|
||||||
if pygame and pygame.mixer and \
|
try:
|
||||||
isinstance(sound, pygame.mixer.sound):
|
if pygame and pygame.mixer and \
|
||||||
sound.set_volume(vol)
|
isinstance(sound, pygame.mixer.sound):
|
||||||
else:
|
sound.set_volume(vol)
|
||||||
sound.setVolume(vol)
|
else:
|
||||||
|
sound.setVolume(vol)
|
||||||
|
except Exception as err:
|
||||||
|
print "Couldn't set volumme: {}".format(err)
|
||||||
|
|
||||||
def changeTheme(self, theme):
|
def changeTheme(self, theme):
|
||||||
# check theme
|
# check theme
|
||||||
|
|
Loading…
Reference in a new issue