Skip to content

Handle sigint gracefully in main - #301

Merged
jerry-skydio merged 1 commit into
mainfrom
jerry/revup/main/teardown
Sep 23, 2026
Merged

jerry-skydio merged 1 commit into
mainfrom
jerry/revup/main/teardown

Conversation

@jerry-skydio

Copy link
Copy Markdown
Collaborator

Cleanly catch the signal and teardown to avoid this traceback

Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/mnt/data/repos/revup/revup/main.py", line 48, in
_main()
File "/mnt/data/repos/revup/revup/main.py", line 26, in _main
sys.exit(loop.run_until_complete(main(revup_parser, all_parsers)))
File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
self.run_forever()
File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
self._run_once()
File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.8/selectors.py", line 468, in select
fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
⠼ Querying github…Exception ignored in: <coroutine object main at 0x7f638c390dc0>
RuntimeError: coroutine ignored GeneratorExit

Cleanly catch the signal and teardown to avoid this traceback

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/mnt/data/repos/revup/revup/__main__.py", line 48, in <module>
    _main()
  File "/mnt/data/repos/revup/revup/__main__.py", line 26, in _main
    sys.exit(loop.run_until_complete(main(revup_parser, all_parsers)))
  File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.8/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
⠼ Querying github…Exception ignored in: <coroutine object main at 0x7f638c390dc0>
RuntimeError: coroutine ignored GeneratorExit
@jerry-skydio

Copy link
Copy Markdown
Collaborator Author

Reviews in this chain:
└#301 Handle sigint gracefully in main

@jerry-skydio
jerry-skydio merged commit 73862ee into main Sep 23, 2026
6 checks passed
@jerry-skydio
jerry-skydio deleted the jerry/revup/main/teardown branch September 23, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants