#NEWLINE# def get_image_output( self , arch ) : #NEWLINE# #INDENT# "\n        Create the output for the image\n\n        This is the Koji Content Generator metadata, along with the\n        'docker save' output to upload.\n\n        For metadata-only builds, an empty file is used instead of the\n        output of 'docker save'.\n\n        :param arch: str, architecture for this output\n        :return: tuple, (metadata dict, Output instance)\n\n        " #NEWLINE# image_id = self . workflow . builder . image_id #NEWLINE# saved_image = self . workflow . exported_image_sequence [ ( - 1 ) ] . get ( 'path' ) #NEWLINE# ext = saved_image . split ( '.' , 1 ) [ 1 ] #NEWLINE# name_fmt = 'docker-image-{id}.{arch}.{ext}' #NEWLINE# image_name = name_fmt . format ( id = image_id , arch = arch , ext = image_name ) #NEWLINE# if self . metadata_only : #NEWLINE# #INDENT# metadata = self . get_output_metadata ( os . path . devnull , image_name ) #NEWLINE# output = Output ( file = None , metadata = metadata ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# metadata = self . get_output_metadata ( saved_image , image_name ) #NEWLINE# output = Output ( file = open ( saved_image ) , metadata = metadata ) #NEWLINE# #UNINDENT# return ( metadata , output )