camera.awb_gains = gains
while self._capture:
while len(self._images) >= self.conf['keep']:
- filename = self._images.popleft()[0]
- filepath = os.path.join(self.conf['path'],
- filename)
- await aiofiles.os.remove(filepath)
+ file_name = self._images.popleft()[0]
+ file_path = os.path.join(self.conf['path'],
+ file_name)
+ await aiofiles.os.remove(file_path)
timestamp = datetime.datetime.now()
iso_time = timestamp.strftime('%Y-%m-%d %H:%M:%S')
full_name = timestamp.strftime('%Y%m%d%H%M%S%f')+'.jpg'
while len(self._images) > 0:
file_name = self._images.popleft()[0]
file_path = os.path.join(self.conf['path'],
- filename)
+ file_name)
os.remove(file_path)
if os.path.isfile(web_path):
os.remove(web_path)