1
0
Fork 0
forked from tobast/sonnetteweb

Add actual ringing

This commit is contained in:
Théophile Bastian 2018-02-06 01:42:11 +01:00
parent 88e42032df
commit c2d16b7700

View file

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