Added remove for unneeded file
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2020-09-30 04:11:05 +02:00
parent 8f44e7d13a
commit 5aff5e242b

View File

@ -5,6 +5,7 @@ from sensor import SoundSensor
from sender import SoundSender
from preprocessor import SoundPreProcessor
from .abcsignalprocessor import AbcSignalProcessor
import os
from birbnetes_iot_platform_raspberry import BirbnetesIoTPlatformStatusDriver
@ -43,6 +44,7 @@ class SoundSignalProcessor(AbcSignalProcessor):
except Exception as e:
logging.exception(e)
BirbnetesIoTPlatformStatusDriver.enqueue_pattern('red', [1, 1, 1])
os.unlink(soundsample_name)
return
if sample_decision:
@ -53,4 +55,7 @@ class SoundSignalProcessor(AbcSignalProcessor):
except (ConnectionError, requests.HTTPError) as e:
logging.exception(e)
BirbnetesIoTPlatformStatusDriver.enqueue_pattern('red', [1, 0, 1, 0, 1])
os.unlink(soundsample_name)
return
os.unlink(soundsample_name)