mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -05:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user