#NEWLINE# @ utils . arg ( 'containers' , metavar = '<container>' , nargs = '+' , help = 'ID or name of the (container)s to stop.' ) #NEWLINE# def do_container_stop( cs , args ) : #NEWLINE# #INDENT# 'Stop specified containers.' #NEWLINE# for container in args . containers : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# cs . containers . stop ( container ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# print ( ( 'Stop for container %(container)s failed: %(e)s' % { #NEWLINE# #INDENT# 'container' : container , #NEWLINE# 'e' : e , #NEWLINE# #UNINDENT# } ) )