mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
Use different exit codes for critical errors vs configuration errors (#5674)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -8,6 +8,8 @@ from aiohttp_json_rpc.rpc import JsonRpcMethod
|
||||
|
||||
import logging
|
||||
|
||||
from redbot.core.cli import ExitCodes
|
||||
|
||||
log = logging.getLogger("red.rpc")
|
||||
|
||||
__all__ = ["RPC", "RPCMixin", "get_name"]
|
||||
@@ -89,7 +91,7 @@ class RPC:
|
||||
)
|
||||
except Exception as exc:
|
||||
log.exception("RPC setup failure", exc_info=exc)
|
||||
sys.exit(1)
|
||||
sys.exit(ExitCodes.CRITICAL)
|
||||
else:
|
||||
await self._site.start()
|
||||
log.debug("Created RPC server listener on port %s", port)
|
||||
|
||||
Reference in New Issue
Block a user