mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-20 16:03:59 +01:00
Merge remote-tracking branch 'ekohl/keyboardinterrupt' into develop
This commit is contained in:
+4
-1
@@ -140,7 +140,10 @@ def main():
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
if not headphones.SIGNAL:
|
if not headphones.SIGNAL:
|
||||||
time.sleep(1)
|
try:
|
||||||
|
time.sleep(1)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
headphones.SIGNAL = 'shutdown'
|
||||||
else:
|
else:
|
||||||
logger.info('Received signal: ' + headphones.SIGNAL)
|
logger.info('Received signal: ' + headphones.SIGNAL)
|
||||||
if headphones.SIGNAL == 'shutdown':
|
if headphones.SIGNAL == 'shutdown':
|
||||||
|
|||||||
Reference in New Issue
Block a user