Commit eff58cb8 authored by Stephane Bortzmeyer's avatar Stephane Bortzmeyer
Browse files

Guard against old libcurl without CONNECT_TO

parent 510b6a3f
......@@ -278,8 +278,10 @@ class Connection:
raise Exception("%s is not IPv4 and not IPv6" % connect)
except netaddr.core.AddrFormatError:
repraddress = connect
self.curl.setopt(pycurl.CONNECT_TO, ["::%s:" % repraddress,])
try:
self.curl.setopt(pycurl.CONNECT_TO, ["::%s:" % repraddress,])
except AttributeError:
pass # Probably an old version of libcurl, without CONNECT_TO. It appeared with 7.49.0
def __str__(self):
return self.server
def end(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment