MCPcopy Create free account
hub / github.com/archlinux/archinstall / delayed_warning

Function delayed_warning

archinstall/lib/menu/util.py:133–148  ·  view source on GitHub ↗
(message: str)

Source from the content-addressed store, hash-verified

131
132
133def delayed_warning(message: str) -> bool:
134 # Issue a final warning before we continue with something un-revertable.
135 # We count down from 5 to 0.
136 print(message, end='', flush=True)
137
138 try:
139 countdown = '\n5...4...3...2...1\n'
140 for c in countdown:
141 print(c, end='', flush=True)
142 time.sleep(0.25)
143 except KeyboardInterrupt:
144 ret: bool = tui.run(confirm_abort)
145 if ret:
146 sys.exit(1)
147
148 return True

Callers 6

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls 2

exitMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected