if sound is not available under windows, don't crash
This commit is contained in:
parent
9aa5b02fc5
commit
7e7bceea97
|
@ -145,8 +145,11 @@ class Interface:
|
|||
if not os.path.exists(path_to_soundfile):
|
||||
return
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
winsound.PlaySound(path_to_soundfile, \
|
||||
winsound.SND_FILENAME|winsound.SND_ASYNC)
|
||||
except:
|
||||
pass
|
||||
elif os.name == 'posix':
|
||||
if gajim.config.get('soundplayer') == '':
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue