]> jfr.im git - erebus.git/blobdiff - bot.py
fix bot exiting on error
[erebus.git] / bot.py
diff --git a/bot.py b/bot.py
index db5859d0c59932218384a7c1e0253a88d838cab0..b92495dea253e709ccb5691c2b6733d20b18a46e 100644 (file)
--- a/bot.py
+++ b/bot.py
@@ -145,8 +145,7 @@ class Bot(object):
                        curs = self.parent.query("UPDATE bots SET connected = 0")
                        curs.close()
                except: pass
-               sys.exit(2)
-               os._exit(2)
+               os._exit(2) # can't use sys.exit since we might be in a sub-thread
        def _got001(self, pieces):
                # We wait until the end of MOTD instead to consider ourselves registered, but consider uptime as of 001
                self.connecttime = time.time()