Added remove for unneeded file
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Pünkösd Marcell 2020-09-30 04:11:05 +02:00
parent 8f44e7d13a
commit 5aff5e242b
1 changed files with 5 additions and 0 deletions

View File

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