changed error codes. the higher the code the lower the error.
This commit is contained in:
parent
4368f6c714
commit
7975061721
1 changed files with 2 additions and 2 deletions
|
|
@ -26,14 +26,14 @@ class TcpconnectService(Service):
|
||||||
try:
|
try:
|
||||||
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(2)
|
||||||
jobInfo.set_message("Could not create socket to host: " + jobInfo.get_host() + " on port: " +
|
jobInfo.set_message("Could not create socket to host: " + jobInfo.get_host() + " on port: " +
|
||||||
str(self.port) + " (" + str(msg) + ")")
|
str(self.port) + " (" + 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(1)
|
||||||
jobInfo.set_message("Could not establish connection to host: " + jobInfo.get_host() + " on port: " +
|
jobInfo.set_message("Could not establish connection to host: " + jobInfo.get_host() + " on port: " +
|
||||||
str(self.port) + " (" + str(msg) + ")")
|
str(self.port) + " (" + str(msg) + ")")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue