def remove_image(image):
 client = _get_client()
 status = base_status.copy()
 try:
  infos = _get_image_infos(image)
  if infos:
   status['id'] = infos['Id']
   try:
    client.remove_image(infos['Id'])
   except Exception:
    _invalid(status, id_=image, out=traceback.format_exc(), comment='Image could not be deleted')
   try:
    infos = _get_image_infos(image)
    _invalid(status, comment='Image marked to be deleted but not deleted yet')
   except Exception:
    _valid(status, id_=image, comment='Image deleted')
  else:
   _invalid(status)
 except Exception:
  _invalid(status, out=traceback.format_exc(), comment='Image does not exist: {0}'.format(image))
 return status

def remove_image ( image ) : client = _get_client ( ) status = base_status . copy ( ) try : infos = _get_image_infos ( image ) if infos : status [ 'id' ] = infos [ 'Id' ] try : client . remove_image ( infos [ 'Id' ] ) except Exception : _invalid ( status , id_ = image , out = traceback . format_exc ( ) , comment = 'Image could not be deleted' ) try : infos = _get_image_infos ( image ) _invalid ( status , comment = 'Image marked to be deleted but not deleted yet' ) except Exception : _valid ( status , id_ = image , comment = 'Image deleted' ) else : _invalid ( status ) except Exception : _invalid ( status , out = traceback . format_exc ( ) , comment = 'Image does not exist: {0}' . format ( image ) ) return status
remove an image from a system .