From: Yen Chi Hsuan Date: Sun, 29 May 2016 11:24:28 +0000 (+0800) Subject: [test/test_http] Fix getsockname() on Jython X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=54fb1996812fa09f0f81ac28f42647e7706212b2;p=youtube-dl [test/test_http] Fix getsockname() on Jython --- diff --git a/test/test_http.py b/test/test_http.py index 6b8493e5e..5076ced51 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -17,7 +17,7 @@ TEST_DIR = os.path.dirname(os.path.abspath(__file__)) 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 sock = httpd.socket.sock else: