From 718e18c20526e2ba000807f67aaaf7578111f4ab Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 20 Dec 2013 10:07:04 +1100 Subject: [PATCH] lock: volume=0 much mean no sound. Telling sound server the volume is zero doesn't work. --- utils/lock.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/lock.py b/utils/lock.py index f627608..4f68d8d 100755 --- a/utils/lock.py +++ b/utils/lock.py @@ -106,6 +106,7 @@ def do_alert(event, who): n = '/run/sound/10-alert' if 'tone' in p and p['tone']: path = p['tone'] + v = 10 if 'volume' in p: v = int(p['volume']) if v < 10: @@ -113,7 +114,8 @@ def do_alert(event, who): if path[0] != '/': path = os.path.join("/usr/share/openmoko/sounds",path) try: - os.symlink(path, n) + if v > 0: + os.symlink(path, n) except: pass if 'vib' in p and p['vib']: -- 2.39.5