aboutsummaryrefslogtreecommitdiff
path: root/bitbotd
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-25 14:13:48 +0100
committerGravatar jesopo2019-10-25 14:13:48 +0100
commit0f0924281c15327a4c10bb57bb3f9e7a545095c0 (patch)
tree48ed5368cd89c12d03b9e0d400553dfa1b680f21 /bitbotd
parent'existing_server' -> 'server' (diff)
signature
use different exit codes for every error circumstance
Diffstat (limited to 'bitbotd')
-rwxr-xr-xbitbotd6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbotd b/bitbotd
index a78cbd66..7bd15e73 100755
--- a/bitbotd
+++ b/bitbotd
@@ -86,7 +86,7 @@ log.info("Starting BitBot %s (Python v%s, db %s)",
lock_file = LockFile.LockFile(lock_location)
if not lock_file.available():
log.critical("Database is locked. Is BitBot already running?")
- sys.exit(1)
+ sys.exit(2)
atexit.register(lock_file.unlock)
lock_file.lock()
@@ -159,13 +159,13 @@ if len(server_configs):
if not bot.connect(server):
log.error("Failed to connect to '%s'" % str(server))
if not args.startup_disconnects:
- sys.exit(1)
+ sys.exit(3)
try:
bot.run()
except Exception as e:
log.critical("Unhandled exception: %s", [str(e)], exc_info=True)
- sys.exit(1)
+ sys.exit(4)
else:
try:
if utils.cli.bool_input("no servers found, add one?"):