def stop_container(container_id):
 try:
  subprocess.check_output(('docker stop %s' % container_id), shell=True)
 except subprocess.CalledProcessError as cpe:
  print ('w3af container failed to stop: "%s"' % cpe)
  sys.exit(1)

def stop_container ( container_id ) : try : subprocess . check_output ( ( 'docker stop %s' % container_id ) , shell = True ) except subprocess . CalledProcessError as cpe : print ( 'w3af container failed to stop: "%s"' % cpe ) sys . exit ( 1 )
stop a running w3af container .