updated error messages
This commit is contained in:
parent
0f64170fd2
commit
324c39b247
1 changed files with 2 additions and 2 deletions
|
|
@ -28,13 +28,13 @@ class TcpconnectService(Service):
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
except socket.error, msg:
|
except socket.error, msg:
|
||||||
jobInfo.set_errorcode(1)
|
jobInfo.set_errorcode(1)
|
||||||
jobInfo.set_message("Could not create socket. (" + msg[1] + ")")
|
jobInfo.set_message("Could not create socket. (" + str(msg) + ")")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sock.connect((jobInfo.get_host(), self.port))
|
sock.connect((jobInfo.get_host(), self.port))
|
||||||
except socket.error, msg:
|
except socket.error, msg:
|
||||||
jobInfo.set_errorcode(2)
|
jobInfo.set_errorcode(2)
|
||||||
jobInfo.set_message("Could not establish connection. (" + msg[1] + ")")
|
jobInfo.set_message("Could not establish connection to host : " + jobInfo.get_host() + " (" + str(msg) + ")")
|
||||||
|
|
||||||
if jobInfo.get_errorcode() == -1:
|
if jobInfo.get_errorcode() == -1:
|
||||||
jobInfo.set_execution_successful(True)
|
jobInfo.set_execution_successful(True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue