#NEWLINE# def _exec_docker_history_slow( long_id = None ) : #NEWLINE# #INDENT# proc = subprocess . Popen ( ( 'docker inspect --format {{.Image}} %s' % long_id ) , shell = True , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) #NEWLINE# image_id = proc . stdout . read ( ) . strip ( ) #NEWLINE# ( out , err ) = proc . communicate ( ) #NEWLINE# if ( history . returncode != 0 ) : #NEWLINE# #INDENT# raise RuntimeError ( 'Could not run docker command' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# history = _get_docker_image_history_slow ( image_id ) #NEWLINE# return history #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# logger . error ( 'Error executing docker history' , exc_info = True ) #NEWLINE# raise