瀏覽代碼

[test/test_http] Fix getsockname() on Jython

Yen Chi Hsuan 9 年之前
父節點
當前提交
54fb199681
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      test/test_http.py

+ 1 - 1
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: