Skip to content
Snippets Groups Projects
Commit 7e7bceea authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

if sound is not available under windows, don't crash

parent 9aa5b02f
No related branches found
No related tags found
No related merge requests found
......@@ -145,8 +145,11 @@ class Interface:
if not os.path.exists(path_to_soundfile):
return
if os.name == 'nt':
winsound.PlaySound(path_to_soundfile, \
try:
winsound.PlaySound(path_to_soundfile, \
winsound.SND_FILENAME|winsound.SND_ASYNC)
except:
pass
elif os.name == 'posix':
if gajim.config.get('soundplayer') == '':
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment