From 7e7bceea97adc3a49f9a026641867575b5f28db7 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 17 May 2005 08:01:49 +0000 Subject: [PATCH] if sound is not available under windows, don't crash --- src/gajim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gajim.py b/src/gajim.py index af0180b15..f1d82b0a1 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -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