]> git.neil.brown.name Git - plato.git/blobdiff - utils/lock.py
lock: allow vib pattern to be set by profile
[plato.git] / utils / lock.py
index 4f68d8d1247c344848b4c94ea9a067abce10b7cd..d7e0253d671ed34cee3d58d721a6ce87cf5c0259 100755 (executable)
@@ -119,7 +119,11 @@ def do_alert(event, who):
         except:
             pass
     if 'vib' in p and p['vib']:
-        set_vibrate(200,400,1800)
+        ptn = p['vib'].split()
+        if len(ptn) == 3 and ptn[0].isdigit and ptn[1].isdigit and ptn[2].isdigit:
+            set_vibrate(int(ptn[0]), int(ptn[1]), int(ptn[2]))
+        else:
+            set_vibrate(200,400,1800)
     return n
 
 class SetAlerts: