1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-14 03:17:16 +08:00

[test/test_http] Fix getsockname() on Jython

This commit is contained in:
Yen Chi Hsuan 2016-05-29 19:24:28 +08:00
parent 978aab2f3d
commit d8c89fb14e
No known key found for this signature in database
GPG Key ID: 3FDDD575826C5C30

View File

@ -17,7 +17,7 @@ TEST_DIR = os.path.dirname(os.path.abspath(__file__))
def http_server_port(httpd): def http_server_port(httpd):
if os.name == 'java': if os.name == 'java' and isinstance(httpd.socket, ssl.SSLSocket):
# In Jython SSLSocket is not a subclass of socket.socket # In Jython SSLSocket is not a subclass of socket.socket
sock = httpd.socket.sock sock = httpd.socket.sock
else: else: