Be quieter in expected shutdown cases (#3261)

* Be quieter in expected cases

* lets put this in the log file

* inline description use because setuptools entrypoint scripts are dumb

* Another setuptools entrypoint related issue

* maybe don't crash the bot on tasks

* improve the handling a bit more + document some of the lower level bits from the perspective of 'why?'

* Adding myself to codeowners on this one

* Let's not clobber our exit code

* And, there we go

* finish that thought

* right, I bumped the python version for (part of) this

* Update redbot/__main__.py

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* Okay, we should be good now

* correct exit code enum use

* cosmetic

* minor fix for linux and ctrl+c

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Michael H
2020-01-08 13:39:52 -05:00
committed by Kowlin
parent af859aa755
commit 35c27c5741
6 changed files with 97 additions and 49 deletions

View File

@@ -418,10 +418,15 @@ def backup(instance: str, destination_folder: Union[str, Path]) -> None:
loop.run_until_complete(create_backup(instance, Path(destination_folder)))
if __name__ == "__main__":
def run_cli():
# Setuptools entry point script stuff...
try:
cli() # pylint: disable=no-value-for-parameter # click
except KeyboardInterrupt:
print("Exiting...")
else:
print("Exiting...")
if __name__ == "__main__":
run_cli()