#NEWLINE# def _image_ref_from_req_data( self , data ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return six . text_type ( data [ 'server' ] [ 'imageRef' ] ) #NEWLINE# #UNINDENT# except ( TypeError , KeyError ) : #NEWLINE# #INDENT# msg = _ ( 'Missing imageRef attribute' ) #NEWLINE# raise exc . HTTPBadRequest ( explanation = msg )