def _deserialize_blobs(artifact_type, blobs_from_db, artifact_properties):
 for (blob_name, blob_value) in six.iteritems(blobs_from_db):
  if (not blob_value):
   continue
  if isinstance(artifact_type.metadata.attributes.blobs.get(blob_name), declarative.ListAttributeDefinition):
   val = []
   for v in blob_value:
    b = definitions.Blob(size=v['size'], locations=v['locations'], checksum=v['checksum'], item_key=v['item_key'])
    val.append(b)
  elif (len(blob_value) == 1):
   val = definitions.Blob(size=blob_value[0]['size'], locations=blob_value[0]['locations'], checksum=blob_value[0]['checksum'], item_key=blob_value[0]['item_key'])
  else:
   raise exception.InvalidArtifactPropertyValue(message=_('Blob %(name)s may not have multiple values'), name=blob_name)
  artifact_properties[blob_name] = val

def _deserialize_blobs ( artifact_type , blobs_from_db , artifact_properties ) : for ( blob_name , blob_value ) in six . iteritems ( blobs_from_db ) : if ( not blob_value ) : continue if isinstance ( artifact_type . metadata . attributes . blobs . get ( blob_name ) , declarative . ListAttributeDefinition ) : val = [ ] for v in blob_value : b = definitions . Blob ( size = v [ 'size' ] , locations = v [ 'locations' ] , checksum = v [ 'checksum' ] , item_key = v [ 'item_key' ] ) val . append ( b ) elif ( len ( blob_value ) == 1 ) : val = definitions . Blob ( size = blob_value [ 0 ] [ 'size' ] , locations = blob_value [ 0 ] [ 'locations' ] , checksum = blob_value [ 0 ] [ 'checksum' ] , item_key = blob_value [ 0 ] [ 'item_key' ] ) else : raise exception . InvalidArtifactPropertyValue ( message = _ ( 'Blob %(name)s may not have multiple values' ) , name = blob_name ) artifact_properties [ blob_name ] = val
retrieves blobs from database .