Bug#546659: DeprecationWarning: socket.ssl() is deprecated
[Sandro Tosi]
> A nicer way to do that is via tuple comparison (not correctly indented
> only mocking):
>
> if sys.version_info[0:2] < (2,6)
> self.sslobj = socket.ssl(self.sock, self.keyfile, self.certfile)
> else:
> self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile)
Could be. I don't really know Python. If that's better, it's what
should also be done at the top of the same file, the 'import ssl' line.
That's where I ripped off the 'if' statement.
Peter
Reply to: