irk: bail out early on connection errors
authorBeat Bolli <bbolli@ewanet.ch>
Wed, 25 Dec 2013 14:30:07 +0000 (15:30 +0100)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 30 May 2014 14:16:15 +0000 (10:16 -0400)
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
irk

diff --git a/irk b/irk
index 3ef9b4ef923b2c1f4cf5d05b8f8e334aa65b7794..1138a0677c90009da4e4818edab1d1f4b2c4570f 100755 (executable)
--- a/irk
+++ b/irk
@@ -24,6 +24,7 @@ try:
     s = socket.create_connection(("localhost", 6659))
 except socket.error, e:
     sys.stderr.write("irk: no irkerd running: %r\n" % e)
+    sys.exit(1)
 
 target = sys.argv[1]
 if not "irc:" in target: