File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -149,15 +149,16 @@ def get_radio_socketpool(radio):
149
149
# versions of the Wiznet5k library or on boards withouut the ssl module
150
150
# see https://docs.circuitpython.org/en/latest/shared-bindings/support_matrix.html
151
151
ssl_context = None
152
- cp_version = sys .implementation [1 ]
153
- if pool .SOCK_STREAM == 1 and cp_version >= WIZNET5K_SSL_SUPPORT_VERSION :
154
- try :
155
- import ssl # pylint: disable=import-outside-toplevel
156
-
157
- ssl_context = ssl .create_default_context ()
158
- except ImportError :
159
- # if SSL not on board, default to fake_ssl_context
160
- pass
152
+ if isinstance (sys .implementation , list ):
153
+ cp_version = sys .implementation [1 ]
154
+ if pool .SOCK_STREAM == 1 and cp_version >= WIZNET5K_SSL_SUPPORT_VERSION :
155
+ try :
156
+ import ssl # pylint: disable=import-outside-toplevel
157
+
158
+ ssl_context = ssl .create_default_context ()
159
+ except ImportError :
160
+ # if SSL not on board, default to fake_ssl_context
161
+ pass
161
162
162
163
if ssl_context is None :
163
164
ssl_context = create_fake_ssl_context (pool , radio )
You can’t perform that action at this time.
0 commit comments