Skip to content

Commit a6dc5b5

Browse files
author
Johannes Kroll
committed
fix socket error handling
1 parent 7b25247 commit a6dc5b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/gp/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,9 +838,9 @@ def connect(self):
838838
try:
839839
if self.socktimeout: self.socket.settimeout(self.socktimeout)
840840
self.socket.connect((self.host, self.port))
841-
except socket.error as (value, message):
841+
except socket.error as ex:
842842
raise gpProtocolException(
843-
"failed to connect to %s:%s: %s %s" % (self.host, self.port, value, message) )
843+
"failed to connect to %s:%s: %s" % (self.host, self.port, str(ex)) )
844844

845845
self.hin = self.socket.makefile("r")
846846
self.hout = self.socket.makefile("w")

0 commit comments

Comments
 (0)