mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
fix: Catch KeyboardInterrupt in main and end spinner
This commit is contained in:
parent
fcc85a7ae6
commit
91d7fbd659
1 changed files with 9 additions and 5 deletions
|
@ -489,11 +489,15 @@ def printable_shell_command(cmd_list):
|
|||
|
||||
def main():
|
||||
spinner = Spinner("Running spinner...")
|
||||
for _ in range(100):
|
||||
time.sleep(0.15)
|
||||
spinner.step()
|
||||
spinner.end()
|
||||
print("Success!")
|
||||
try:
|
||||
for _ in range(100):
|
||||
time.sleep(0.15)
|
||||
spinner.step()
|
||||
print("Success!")
|
||||
except KeyboardInterrupt:
|
||||
print("\nInterrupted by user.")
|
||||
finally:
|
||||
spinner.end()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue