From 7975061721772ce151b04a118abee788b8a30a88 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Sun, 18 Aug 2013 23:41:23 +0200 Subject: [PATCH] changed error codes. the higher the code the lower the error. --- lib/services/tcpconnect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/tcpconnect.py b/lib/services/tcpconnect.py index 0d8da3d..8a498fa 100644 --- a/lib/services/tcpconnect.py +++ b/lib/services/tcpconnect.py @@ -26,14 +26,14 @@ class TcpconnectService(Service): try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) except socket.error, msg: - jobInfo.set_errorcode(1) + jobInfo.set_errorcode(2) jobInfo.set_message("Could not create socket to host: " + jobInfo.get_host() + " on port: " + str(self.port) + " (" + str(msg) + ")") try: sock.connect((jobInfo.get_host(), self.port)) except socket.error, msg: - jobInfo.set_errorcode(2) + jobInfo.set_errorcode(1) jobInfo.set_message("Could not establish connection to host: " + jobInfo.get_host() + " on port: " + str(self.port) + " (" + str(msg) + ")")