Add actual ringing

This commit is contained in:
Théophile Bastian 2018-02-06 01:42:11 +01:00
parent 88e42032df
commit c2d16b7700
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Sonnez via le réseau local. C'est cool, hein ?
"""
from datetime import datetime, timedelta
import subprocess
from flask import Flask, render_template, request
app = Flask('sonnetteweb')
@ -26,7 +27,11 @@ class Ringer:
return False
self.last_rung = datetime.now()
print('dring')
print('Dring!')
subprocess.run(['bash',
'-c',
'aplay ringtone.wav &'])
return True