Skip to content

Commit ecce963

Browse files
committed
Disable ssl verification in core_geometry_airfoil
1 parent 9f0277b commit ecce963

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/core_geometry_airfoil.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
# Explanations for this script can be found at
2222
# http://pythonocc.wordpress.com/2013/04/01/using-external-airfoil-data-to-create-a-solid-wing/
2323
#
24-
try:
25-
import urllib.request as urllib2 # Python3
26-
except ImportError:
27-
import urllib2 # Python2
24+
import ssl
25+
import urllib.request as urllib2
2826

2927
from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeFace
3028
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakePrism
@@ -50,6 +48,8 @@ def __init__(self, chord, span, profile):
5048
def make_shape(self):
5149
# 1 - retrieve the data from the UIUC airfoil data page
5250
foil_dat_url = 'http://m-selig.ae.illinois.edu/ads/coord_seligFmt/%s.dat' % self.profile
51+
# explicitly tell to not use ssl verification
52+
ssl._create_default_https_context = ssl._create_unverified_context
5353
print("Connecting to m-selig, retrieving foil data")
5454
f = urllib2.urlopen(foil_dat_url)
5555
print("Building foil geometry")

0 commit comments

Comments
 (0)