MCPcopy Create free account
hub / github.com/aws/aws-cli / ok_handler

Method ok_handler

awscli/autoprompt/widgets.py:360–368  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

358 app.layout.focus(self._dialog_prev_focus)
359
360 def ok_handler(*args, **kwargs):
361 app = get_app()
362 buffer = app.layout.get_buffer_by_name('debug_buffer')
363 with open(os.path.expanduser(textfield.text), 'w') as f:
364 f.write(buffer.document.text)
365 textfield.text = default_filename
366 app.layout.focus(textfield)
367 self.float_container.floats.pop()
368 app.layout.focus(self._dialog_prev_focus)
369
370 ok_button = Button(text='Save', handler=ok_handler)
371 cancel_button = Button(text='Cancel', handler=cancel_handler)

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected