'Delete an old image.'

def delete_image(self, event):

    remove_image = os.path.join(self._directory_path, '{}{}'.format(self._image_id, '.jpg'))
    try:
        os.remove(remove_image)
        _LOGGER.debug('Deleting    old    image    %s', remove_image)
    except OSError as error:
        if (error.errno != errno.ENOENT):
            raise
