Cleaner exit code.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 2 Dec 2013 15:45:18 +0000 (10:45 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 2 Dec 2013 15:45:18 +0000 (10:45 -0500)
irkerd

diff --git a/irkerd b/irkerd
index 705b20c04d45d8958b0c86ef7f81df8cc2422d7b..024a4466ea5560902c0830b07c4fb4e9609fff95 100755 (executable)
--- a/irkerd
+++ b/irkerd
@@ -873,9 +873,7 @@ if __name__ == '__main__':
     irker = Irker(debuglevel=debuglvl)
     irker.irc.debug(1, "irkerd version %s" % version)
     if immediate:
-        def bailout():
-            raise SystemExit, 0
-        irker.irc.add_event_handler("quit", lambda _c, _e: bailout())
+        irker.irc.add_event_handler("quit", lambda _c, _e: sys.exit(0))
         irker.handle('{"to":"%s","privmsg":"%s"}' % (immediate, arguments[0]), quit_after=True)
         irker.irc.spin()
     else: