code: def _handle_abort(self, machine, allocated):
          
          abort = yes_or_no("Abort deployment?")
          if abort:
              with utils.Spinner() as context:
                  if allocated:
                      context.msg = colorized(
                          "{autoblue}Releasing{/autoblue} %s") % (
                              machine.hostname)
                      machine.release()
                      context.print(colorized(
                          "{autoblue}Released{/autoblue} %s") % (
                              machine.hostname))
                  else:
                      context.msg = colorized(
                          "{autoblue}Aborting{/autoblue} %s") % (
                              machine.hostname)
                      machine.abort()
                      context.print(colorized(
                          "{autoblue}Aborted{/autoblue} %s") % (
                              machine.hostname))
docs: Handle the user aborting mid deployment.