Fix python2/3 compat issue

This commit is contained in:
Rafa de la Torre 2019-11-13 17:02:22 +01:00
parent 19c6de2096
commit 203bd64058

View File

@ -158,8 +158,8 @@ AS $$
s.connect((host, int(port)))
t_stop = timer()
s.shutdown(socket.SHUT_RD)
except (socket.timeout, OSError, socket.error), ex:
#-- TODO uncomment & fix: plpy.warning('could not connect to server %s:%d, %s' % (host, port, str(ex)))
except (socket.timeout, OSError, socket.error) as ex:
plpy.warning('could not connect to server %s:%d, %s' % (host, port, str(ex)))
n_errors += 1
finally:
s.close()