some cleanups and bug fixes.

This commit is contained in:
Johannes Findeisen 2013-08-14 20:36:35 +02:00
commit 7c12fe04e6
6 changed files with 25 additions and 17 deletions

View file

@ -27,12 +27,11 @@ class TcpconnectService(Service):
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error, msg:
#log.w("%s\n" % msg[1])
self.errorcode = 1
try:
sock.connect((self.host, self.port))
sock.connect((host, self.port))
except socket.error, msg:
#log.w("%s\n" % msg[1])
self.errorcode = 2